[XPU] fix weight scale shape (#42725)

Signed-off-by: Zhu, Zufang <zufang.zhu@intel.com>
Co-authored-by: Kunshang Ji <kunshang.ji@intel.com>
This commit is contained in:
zofia
2026-05-17 16:55:10 +08:00
committed by GitHub
co-authored by Kunshang Ji
parent ff712f6447
commit 0fa888465e
@@ -59,6 +59,9 @@ class XPUFP8ScaledMMLinearKernel(FP8ScaledMMLinearKernel):
replace_parameter(layer, "weight", weight.data.t())
# else: already in [in, out] layout — no-op
weight_scale = layer.weight_scale.t().contiguous()
replace_parameter(layer, "weight_scale", weight_scale.data)
def apply_weights(
self,
layer: torch.nn.Module,