From a358374ae93785ba8a6df4c5cf427d89003ac28d Mon Sep 17 00:00:00 2001 From: icarus_zh <37328560+zhsurpass@users.noreply.github.com> Date: Mon, 27 Jul 2026 09:20:28 +0800 Subject: [PATCH] [NPU][Fix Issue]: Send expert weights contiguous tensor across cards during EPLB rebalance (#32001) --- .../sglang/srt/hardware_backend/npu/quantization/moe_methods.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/sglang/srt/hardware_backend/npu/quantization/moe_methods.py b/python/sglang/srt/hardware_backend/npu/quantization/moe_methods.py index f08d1af6c..f49d53534 100644 --- a/python/sglang/srt/hardware_backend/npu/quantization/moe_methods.py +++ b/python/sglang/srt/hardware_backend/npu/quantization/moe_methods.py @@ -332,7 +332,7 @@ class NPUW8A8Int8MoEMethod(_NPUMoEMethodBase): # Process weight weight: torch.Tensor = getattr(layer, f"{weight_prefix}_weight") - weight.data = npu_format_cast(weight.data.transpose(1, 2)) + weight.data = npu_format_cast(weight.data.transpose(1, 2).contiguous()) # Set dispatcher output dtype if weight_prefix == "w13":