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 ecbc8a3c2..88e6ce4f7 100644 --- a/python/sglang/srt/hardware_backend/npu/attention/ascend_backend.py +++ b/python/sglang/srt/hardware_backend/npu/attention/ascend_backend.py @@ -1815,7 +1815,7 @@ class AscendAttnBackend(AttentionBackend): torch.ops.npu.npu_fused_infer_attention_score( q[None, q_len_offset : q_len_offset + q_len], k[None, q_len_offset : q_len_offset + q_len], - v[None, q_len_offset : q_len_offset + q_len], + v[None, q_len_offset : q_len_offset + q_len].contiguous(), num_heads=layer.tp_q_head_num, num_key_value_heads=layer.tp_k_head_num, input_layout="BSND", # todo, TND not supports q_heads!=k_heads