From a95c9f5b815cc4fed373e1f3483868652a67a778 Mon Sep 17 00:00:00 2001 From: JiaruiChang5268 <71279366+JiaruiChang5268@users.noreply.github.com> Date: Wed, 21 Jan 2026 23:58:25 +0800 Subject: [PATCH] [NPU] Remove paged attention & Change fia to default attention (#17394) Co-authored-by: Liwansi <62291011+Liwansi@users.noreply.github.com> Co-authored-by: chenxu214 Co-authored-by: chenyang08056032 --- .../npu/attention/ascend_backend.py | 131 ++++++------------ .../eagle_draft_npu_graph_runner.py | 17 +-- .../npu/graph_runner/npu_graph_runner.py | 29 +--- 3 files changed, 57 insertions(+), 120 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 fa82245ed..45aa241e5 100644 --- a/python/sglang/srt/hardware_backend/npu/attention/ascend_backend.py +++ b/python/sglang/srt/hardware_backend/npu/attention/ascend_backend.py @@ -18,7 +18,6 @@ from sglang.srt.hardware_backend.npu.attention.mla_preprocess import ( from sglang.srt.layers.attention.base_attn_backend import AttentionBackend from sglang.srt.layers.attention.nsa.utils import is_nsa_enable_prefill_cp from sglang.srt.layers.attention.torch_native_backend import TorchNativeAttnBackend -from sglang.srt.layers.dp_attention import get_attention_tp_size from sglang.srt.layers.radix_attention import AttentionType from sglang.srt.model_executor.forward_batch_info import ForwardBatch, ForwardMode from sglang.srt.speculative.spec_info import SpecInput @@ -1098,93 +1097,53 @@ class AscendAttnBackend(AttentionBackend): return attn_out if not self.use_mla: - num_tokens = q.shape[0] - """PA will support bs