File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -1114,14 +1114,19 @@ def _process_reqs(
1114
1114
if self .dp_size > 1 else num_input_tokens )
1115
1115
padded_batch_size = self .select_torchair_padded_batch_size (
1116
1116
max_num_tokens )
1117
- num_tokens_across_dp .masked_fill_ (num_tokens_across_dp == - 1 ,
1118
- padded_batch_size )
1119
1117
graph_pad_size = padded_batch_size - total_num_scheduled_tokens
1120
1118
extra_builder_kwargs ['graph_pad_size' ] = graph_pad_size
1119
+ # If torchair graph is enabled and in decode mode, the dummy run
1120
+ # batch size is set to the selected graph size.
1121
+ dummy_num_tokens = padded_batch_size
1121
1122
else :
1122
1123
# If torchair graph is not enabled, or if with_prefill is True, the
1123
1124
# dummy run batch size is set to 1.
1124
- num_tokens_across_dp .masked_fill_ (num_tokens_across_dp == - 1 , 1 )
1125
+ dummy_num_tokens = 1
1126
+
1127
+ if self .dp_size > 1 :
1128
+ num_tokens_across_dp .masked_fill_ (num_tokens_across_dp == - 1 ,
1129
+ dummy_num_tokens )
1125
1130
1126
1131
if self .vllm_config .model_config .use_mla :
1127
1132
attn_metadata = self .attn_metadata_builder .build ( # type: ignore
You can’t perform that action at this time.
0 commit comments