From c16a8fc89995a93f683c71f4aa7eb49b1000d104 Mon Sep 17 00:00:00 2001 From: chx96642264 Date: Tue, 1 Sep 2026 17:31:11 +0800 Subject: [PATCH] [NPU] [bugfix] Fix NPU MLA HiCache backup accessing missing data_ptrs. (#36813) --- python/sglang/srt/mem_cache/pool_host/mla.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/python/sglang/srt/mem_cache/pool_host/mla.py b/python/sglang/srt/mem_cache/pool_host/mla.py index ed00e5c8a..41c651c3b 100644 --- a/python/sglang/srt/mem_cache/pool_host/mla.py +++ b/python/sglang/srt/mem_cache/pool_host/mla.py @@ -441,9 +441,14 @@ class MLATokenToKVPoolHost(HiSparseHostPoolMixin, HostKVCache): ) return - device_data_ptrs, device_kv_buffers = self._resolve_device_transfer_buffers( - device_pool - ) + if io_backend == "kernel_ascend": + # NPU pools use contiguous multi-layer tensors and intentionally do + # not build the CUDA-style data_ptrs array. + device_data_ptrs, device_kv_buffers = None, None + else: + device_data_ptrs, device_kv_buffers = self._resolve_device_transfer_buffers( + device_pool + ) if io_backend == "kernel": if self.layout == "layer_first":