[PerfFix] Avoid separate thread for MP executor shm spin (#28012)

Signed-off-by: Nick Hill <nhill@redhat.com>
This commit is contained in:
Nick Hill
2025-11-04 08:33:55 -08:00
committed by GitHub
parent 05cae69f0f
commit c9f66da8fd
9 changed files with 145 additions and 133 deletions
+2 -2
View File
@@ -171,7 +171,7 @@ class Executor(ABC):
args: tuple = (),
kwargs: dict | None = None,
non_block: Literal[True] = True,
) -> list[Future[_R]]:
) -> Future[list[_R]]:
pass
@abstractmethod
@@ -219,7 +219,7 @@ class Executor(ABC):
def sample_tokens(
self, grammar_output: GrammarOutput | None, non_block: bool = False
) -> ModelRunnerOutput | Future[ModelRunnerOutput]:
) -> ModelRunnerOutput | None | Future[ModelRunnerOutput | None]:
output = self.collective_rpc( # type: ignore[call-overload]
"sample_tokens", args=(grammar_output,), non_block=non_block
)