[AMD][Bugfix] Skip invalid fused MoE reduction for direct top-1 output (#36309)
This commit is contained in:
@@ -908,7 +908,9 @@ def _fused_moe_kernel_sequence(
|
|||||||
routed_scaling_factor,
|
routed_scaling_factor,
|
||||||
)
|
)
|
||||||
elif _is_hip:
|
elif _is_hip:
|
||||||
if _use_aiter:
|
if topk == 1 and routed_scaling_factor == 1.0 and not _use_intermediate:
|
||||||
|
pass # we wrote directly into out_hidden_states
|
||||||
|
elif _use_aiter:
|
||||||
moe_sum(
|
moe_sum(
|
||||||
intermediate_cache3.view(*intermediate_cache3.shape),
|
intermediate_cache3.view(*intermediate_cache3.shape),
|
||||||
out_hidden_states,
|
out_hidden_states,
|
||||||
|
|||||||
Reference in New Issue
Block a user