fix the fp8 topk_config.correction_bias is none bug (#10040)

This commit is contained in:
Rain Jiang
2025-09-07 20:28:14 -07:00
committed by GitHub
parent bc5fc332f7
commit 7802586cab

View File

@@ -1132,10 +1132,12 @@ class Fp8MoEMethod(FusedMoEMethodBase):
and topk_config.topk_group is not None
), "Current trtllm_fp8_block_scale_moe kernel does not support these two arguments as None"
if topk_config.correction_bias is None:
correction_bias = topk_config.correction_bias.to(x.dtype)
else:
correction_bias = None
correction_bias = (
None
if topk_config.correction_bias is None
else topk_config.correction_bias.to(x.dtype)
)
return trtllm_fp8_block_scale_moe(
routing_logits=router_logits.to(torch.float32),
routing_bias=correction_bias,