Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion vllm/worker/hpu_model_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -2704,6 +2704,8 @@ def try_revert_dummy_output_tokens():

if use_delayed_sampling:
fake_output = self._delayed_sampler_outputs(model_input)
elif model_input.async_callback is not None:
model_input.async_callback()

with self.profiler.record_event(
'internal', ('sample_'
Expand All @@ -2725,7 +2727,8 @@ def try_revert_dummy_output_tokens():
self.cached_step_outputs.append(output)
self.cached_step_inputs.append(model_input)
htorch.core.mark_step()
if model_input.async_callback is not None:
if use_delayed_sampling \
and model_input.async_callback is not None:
model_input.async_callback()
if i < num_steps - 1:
if i == 0:
Expand Down