[XPU] Support register KV offload mmap region as pinned host memory on XPU (#51956)

Signed-off-by: Chaojun Zhang <chaojun.zhang@intel.com>
This commit is contained in:
Chaojun Zhang
2026-10-09 18:58:07 +08:00
committed by GitHub
parent 5cadabfafd
commit b027ac8312
6 changed files with 151 additions and 100 deletions
+3 -1
View File
@@ -162,7 +162,9 @@ class CPUOffloadingSpec(OffloadingSpec):
def _uses_shared_region(self) -> bool:
"""Whether the worker CPU buffer is the shared mmap region (vs a private
per-rank tensor); replicated-layout dedup is gated on this being True."""
return current_platform.is_cuda_alike() and not current_platform.is_rocm()
return (
current_platform.is_cuda_alike() and not current_platform.is_rocm()
) or current_platform.is_xpu()
def create_worker(self, kv_caches: CanonicalKVCaches) -> CPUOffloadingWorker:
mmap_region: SharedOffloadRegion | None = None