Fix the run-time error when calling fused_rms_mxfp4_quant that change return output number (#12803)
Co-authored-by: wunhuang <wunhuang@amd.com>
This commit is contained in:
@@ -268,7 +268,7 @@ class LayerCommunicator:
|
||||
residual = hidden_states
|
||||
|
||||
if _use_aiter and _is_gfx95_supported and ("mxfp4" in qaunt_format):
|
||||
hidden_states = fused_rms_mxfp4_quant(
|
||||
hidden_states, *_, _ = fused_rms_mxfp4_quant(
|
||||
hidden_states,
|
||||
self.input_layernorm.weight,
|
||||
self.input_layernorm.variance_epsilon,
|
||||
@@ -281,7 +281,7 @@ class LayerCommunicator:
|
||||
hidden_states = self.input_layernorm(hidden_states)
|
||||
else:
|
||||
if _use_aiter and _is_gfx95_supported and ("mxfp4" in qaunt_format):
|
||||
hidden_states, residual = fused_rms_mxfp4_quant(
|
||||
hidden_states, *_, residual = fused_rms_mxfp4_quant(
|
||||
hidden_states,
|
||||
self.input_layernorm.weight,
|
||||
self.input_layernorm.variance_epsilon,
|
||||
|
||||
@@ -1608,7 +1608,7 @@ class DeepseekV2AttentionMLA(nn.Module):
|
||||
current_stream.wait_stream(self.alt_stream)
|
||||
else:
|
||||
if _use_aiter_gfx95 and self.q_b_proj.weight.dtype == torch.uint8:
|
||||
q, k_nope = fused_rms_mxfp4_quant(
|
||||
q, k_nope, *_ = fused_rms_mxfp4_quant(
|
||||
q,
|
||||
self.q_a_layernorm.weight,
|
||||
self.q_a_layernorm.variance_epsilon,
|
||||
@@ -1937,7 +1937,7 @@ class DeepseekV2AttentionMLA(nn.Module):
|
||||
current_stream.wait_stream(self.alt_stream)
|
||||
else:
|
||||
if _use_aiter_gfx95 and self.q_b_proj.weight.dtype == torch.uint8:
|
||||
q, k_nope = fused_rms_mxfp4_quant(
|
||||
q, k_nope, *_ = fused_rms_mxfp4_quant(
|
||||
q,
|
||||
self.q_a_layernorm.weight,
|
||||
self.q_a_layernorm.variance_epsilon,
|
||||
|
||||
Reference in New Issue
Block a user