From b03ac355e795b3a86b26b8732c47c0965fd71bbc Mon Sep 17 00:00:00 2001 From: silencejade <222910030+silencejade@users.noreply.github.com> Date: Thu, 20 Aug 2026 20:43:40 +0800 Subject: [PATCH] [NPU] [FIX] Fix non-contiguous parameter issue in FIA operator (#34936) --- .../srt/hardware_backend/npu/attention/ascend_backend.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/sglang/srt/hardware_backend/npu/attention/ascend_backend.py b/python/sglang/srt/hardware_backend/npu/attention/ascend_backend.py index 7bd540888..d229a4bc0 100644 --- a/python/sglang/srt/hardware_backend/npu/attention/ascend_backend.py +++ b/python/sglang/srt/hardware_backend/npu/attention/ascend_backend.py @@ -1871,10 +1871,10 @@ class AscendAttnBackend(AttentionBackend): attn_output, _ = torch.ops.npu.npu_fused_infer_attention_score( q_nope, - k_nope, - v, + k_nope.contiguous(), + v.contiguous(), query_rope=q_rope, - key_rope=k_rope, + key_rope=k_rope.contiguous(), num_heads=layer.tp_q_head_num, input_layout="TND", atten_mask=self.fia_mask,