File tree Expand file tree Collapse file tree
megatron/core/inference/text_generation_controllers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1696,6 +1696,7 @@ async def async_generate_output_tokens_dynamic_batch(
16961696 # Forward pass produces only base logits. When speculative decoding is
16971697 # active, MTP logits are computed serially after verification.
16981698 self ._dynamic_step_forward_logits (input_ids , position_ids )
1699+ torch .cuda .current_stream ().wait_event (self ._pre_forward_bookkeeping_event )
16991700
17001701 # Commit Mamba intermediate states before update_requests, which
17011702 # may swap request indices. The Python lists tracking EOS block IDs
@@ -1716,7 +1717,6 @@ async def async_generate_output_tokens_dynamic_batch(
17161717 # NOTE [TDE]: This will be moved once CPU and GPU methods are separated.
17171718 await asyncio .sleep (0 )
17181719
1719- torch .cuda .current_stream ().wait_event (self ._pre_forward_bookkeeping_event )
17201720 with torch .inference_mode ():
17211721 return_log_probs , return_top_n_logprobs = self ._dynamic_step_log_probs_bookkeeping ()
17221722 if self .num_speculative_tokens > 0 :
You can’t perform that action at this time.
0 commit comments