[Core] Simplify MRV2 async output handling (#45442)

This commit is contained in:
Nick Hill
2026-06-13 18:15:36 -07:00
committed by GitHub
parent 71b961dd35
commit cf027b86af
3 changed files with 8 additions and 14 deletions
+2 -7
View File
@@ -145,7 +145,6 @@ class GPUModelRunner(LoRAModelRunnerMixin):
self.max_num_reqs = self.scheduler_config.max_num_seqs
self.is_encoder_decoder = self.model_config.is_encoder_decoder
self.use_async_scheduling = self.scheduler_config.async_scheduling
self.output_copy_stream = torch.cuda.Stream(self.device)
# Pipeline parallelism.
@@ -1457,9 +1456,7 @@ class GPUModelRunner(LoRAModelRunnerMixin):
kv_connector_output = self.kv_connector.post_forward(finished_req_ids)
model_runner_output.kv_connector_output = kv_connector_output
if self.use_async_scheduling:
return async_output
return async_output.get_output()
return async_output
def take_draft_token_ids(self) -> DraftTokenIds | None:
return self.draft_tokens_handler.get_draft_tokens()
@@ -1503,9 +1500,7 @@ class GPUModelRunner(LoRAModelRunnerMixin):
)
self.postprocess_num_computed_tokens(input_batch)
if self.use_async_scheduling:
return async_output
return async_output.get_output()
return async_output
def postprocess_num_computed_tokens(self, input_batch: InputBatch) -> None:
# Update the number of computed tokens.