[PerfFix] Avoid separate thread for MP executor shm spin (take 2) (#28319)

Signed-off-by: Nick Hill <nhill@redhat.com>
This commit is contained in:
Nick Hill
2025-11-07 14:11:03 -08:00
committed by GitHub
parent da786e339e
commit 67a2da890e
9 changed files with 156 additions and 131 deletions

View File

@@ -524,7 +524,7 @@ class Worker(WorkerBase):
@torch.inference_mode()
def sample_tokens(
self, grammar_output: "GrammarOutput"
self, grammar_output: "GrammarOutput | None"
) -> ModelRunnerOutput | AsyncModelRunnerOutput:
return self.model_runner.sample_tokens(grammar_output)