Skip to content

Commit a7195df

Browse files
committed
rename kwargs1 in fused_experts_with_mc2
Signed-off-by: David9857 <985700846@qq.com>
1 parent b01cc94 commit a7195df

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

vllm_ascend/quantization/w8a8_dynamic.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def fused_experts_with_mc2(hidden_states: torch.Tensor,
147147
global_bs = 0
148148
moe_expert_num = len(expert_map)
149149
# hidden_states = hidden_states.bfloat16()
150-
kwargs1 = {
150+
kwargs_mc2 = {
151151
"x": hidden_states,
152152
"expert_ids": topk_ids,
153153
"expert_shard_type": 0,
@@ -178,9 +178,9 @@ def fused_experts_with_mc2(hidden_states: torch.Tensor,
178178
"tp_world_size": tp_size,
179179
"tp_rank_id": tp_rank,
180180
}
181-
kwargs1.update(stage1_kwargs)
181+
kwargs_mc2.update(stage1_kwargs)
182182

183-
output = torch_npu.npu_moe_distribute_dispatch(**kwargs1)
183+
output = torch_npu.npu_moe_distribute_dispatch(**kwargs_mc2)
184184
# comm_stream.wait_stream(torch.npu.current_stream())
185185
expand_x, dynamic_scale, expand_idx, expert_token_nums, ep_recv_counts = output[
186186
0:5]
@@ -206,7 +206,7 @@ def fused_experts_with_mc2(hidden_states: torch.Tensor,
206206
down_out_list, shared_output = down_out_list
207207

208208
# moeCombine
209-
kwargs2 = {
209+
kwargs_mc2 = {
210210
"expand_x": down_out_list,
211211
"expert_ids": topk_ids,
212212
"expand_idx": expand_idx,
@@ -230,9 +230,9 @@ def fused_experts_with_mc2(hidden_states: torch.Tensor,
230230
"tp_world_size": tp_size,
231231
"tp_rank_id": tp_rank,
232232
}
233-
kwargs2.update(stage3_kwargs)
233+
kwargs_mc2.update(stage3_kwargs)
234234

235-
hidden_states = torch_npu.npu_moe_distribute_combine(**kwargs2)
235+
hidden_states = torch_npu.npu_moe_distribute_combine(**kwargs_mc2)
236236

237237
if multi_stream:
238238
return hidden_states, shared_output

0 commit comments

Comments
 (0)