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 d93cc5f62..e7acdee86 100644 --- a/python/sglang/srt/hardware_backend/npu/attention/ascend_backend.py +++ b/python/sglang/srt/hardware_backend/npu/attention/ascend_backend.py @@ -860,7 +860,7 @@ class AscendAttnBackend(AttentionBackend): sinks: Optional[torch.Tensor] = None, slopes: Optional[torch.Tensor] = None, ): - if is_mla_preprocess_enabled(): + if is_mla_preprocess_enabled() and self.use_mla: # MLAPO and MLAPROLOG do save kv_cache save_kv_cache = False if self.is_dllm_model: @@ -1773,7 +1773,7 @@ class AscendAttnBackend(AttentionBackend): sinks: Optional[torch.Tensor] = None, slopes: Optional[torch.Tensor] = None, ): - if is_mla_preprocess_enabled(): + if is_mla_preprocess_enabled() and self.use_mla: # MLAPO does saving kv_cache save_kv_cache = False if topk_indices is not None: