[BugFix] Fix type error when assign a trition kernel tensor to a torch.nn.Parameter (#28603)

Signed-off-by: Zijing Liu <liuzijing2014@gmail.com>
This commit is contained in:
Zijing Liu
2025-11-13 03:30:04 -08:00
committed by GitHub
parent e63fd44560
commit 5e973209aa

View File

@@ -755,8 +755,8 @@ class Mxfp4MoEMethod(FusedMoEMethodBase):
self.w13_weight = w13_weight self.w13_weight = w13_weight
self.w2_weight = w2_weight self.w2_weight = w2_weight
layer.w13_weight = w13_weight layer.w13_weight = Parameter(w13_weight.data, requires_grad=False)
layer.w2_weight = w2_weight layer.w2_weight = Parameter(w2_weight.data, requires_grad=False)
else: else:
raise ValueError(f"Unsupported backend: {self.mxfp4_backend}") raise ValueError(f"Unsupported backend: {self.mxfp4_backend}")