From 8085aca7913fa7cf3181d05f7c80a500ddff4184 Mon Sep 17 00:00:00 2001 From: alanhe151220037 <812589971@qq.com> Date: Tue, 9 Sep 2025 00:49:43 +0800 Subject: [PATCH] [Bug fix] Fix ascend mla in aclgraph (#9925) --- python/sglang/srt/layers/attention/ascend_backend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/sglang/srt/layers/attention/ascend_backend.py b/python/sglang/srt/layers/attention/ascend_backend.py index d4ede0a4c..7f31acf81 100644 --- a/python/sglang/srt/layers/attention/ascend_backend.py +++ b/python/sglang/srt/layers/attention/ascend_backend.py @@ -368,7 +368,7 @@ class AscendAttnBackend(AttentionBackend): -1, layer.tp_v_head_num, self.page_size, self.kv_lora_rank ) - q_nope = q.view(-1, layer.tp_q_head_num, 1, self.kv_lora_rank) + q_nope = q.view(-1, layer.tp_q_head_num, 1, self.kv_lora_rank).contiguous() q_rope = q_rope.view(-1, layer.tp_q_head_num, 1, self.qk_rope_head_dim) if self.forward_metadata.seq_lens_cpu_int is None: actual_seq_len_kv = self.forward_metadata.seq_lens_cpu_list