fix the fp8 topk_config.correction_bias is none bug (#10040)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user