[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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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