[BugFix] fix gpt-oss-120b launch failure with --enable-piecewise-cuda-graph (#16757)

This commit is contained in:
Minglei Zhu
2026-01-10 17:19:59 -08:00
committed by GitHub
parent 2a9344d320
commit a2c2c09d7d

View File

@@ -565,10 +565,16 @@ class Mxfp4MoEMethod(FusedMoEMethodBase):
from triton_kernels.numerics_details.mxfp import upcast_from_mxfp
w13_weight = upcast_from_mxfp(
layer.w13_weight, layer.w13_weight_scale, dtype=torch.bfloat16, axis=-1
layer.w13_weight,
layer.w13_weight_scale,
target_dtype=torch.bfloat16,
axis=-1,
)
w2_weight = upcast_from_mxfp(
layer.w2_weight, layer.w2_weight_scale, dtype=torch.bfloat16, axis=-1
layer.w2_weight,
layer.w2_weight_scale,
target_dtype=torch.bfloat16,
axis=-1,
)
del layer.w13_weight
del layer.w2_weight