Repository navigation
[TENT] Add intra-node PCIe P2P copies between Intel XPUs - #4379
Conversation
721a9a2 to
ecdb2ed
Compare
ecdb2ed to
4e57f3c
Compare
There was a problem hiding this comment.
🟡 Changes recommended
IPC cache identity, mapping lifetime races, and dma-buf range validation can cause stale or unsafe transfers.
5 open findings
What changed in this PR
Adds same-node Intel XPU transfers using PCIe/Xe Link peer copies and Level Zero IPC, while retaining RDMA/TCP staging fallbacks.
Changes:
- Adds XPU device-to-device copies, dma-buf export, and cross-process IPC mapping.
- Updates transport selection for local XPU, IPC, direct RDMA, and fallback routes.
- Expands XPU/RDMA tests and deployment documentation.
| File | Description |
|---|---|
tent/tests/xpu/xpu_transport_test.cpp |
Tests local D2D copies and unmapped peers. |
tent/tests/xpu/xpu_platform_test.cpp |
Tests enumeration, D2D, dma-buf, and IPC. |
tent/tests/xpu/xpu_ipc_process_test.cpp |
Adds cross-process IPC and fallback tests. |
tent/tests/xpu/xpu_engine_test.cpp |
Tests local, IPC, and direct-RDMA routing. |
tent/tests/transport_selector_test.cpp |
Covers XPU IPC selection rules. |
tent/tests/rdma_transport_test.cpp |
Tests dma-buf MR registration. |
tent/tests/CMakeLists.txt |
Registers the IPC process test. |
tent/src/transport/xpu/xpu_transport.cpp |
Implements IPC publication, import, and relocation. |
tent/src/transport/rdma/rdma_transport.cpp |
Detects XPU dma-buf capability. |
tent/src/transport/rdma/ibv_loader.cpp |
Loads the optional dma-buf verb. |
tent/src/transport/rdma/context.cpp |
Registers and tracks dma-buf MRs. |
tent/src/runtime/transport_selector.cpp |
Allows mapped same-host XPU peers. |
tent/src/runtime/transfer_engine_impl.cpp |
Plans IPC, direct RDMA, and staged routes. |
tent/src/runtime/platform.cpp |
Adds default dma-buf export behavior. |
tent/src/platform/xpu/xpu_sycl_backend.h |
Implements peer access, D2D, dma-buf, and IPC. |
tent/src/platform/xpu/xpu_platform.cpp |
Exposes XPU D2D and sharing operations. |
tent/include/tent/transport/xpu/xpu_transport.h |
Defines XPU IPC transport state. |
tent/include/tent/transport/rdma/ibv_loader.h |
Declares the dma-buf verb symbol. |
tent/include/tent/transport/rdma/context.h |
Defines dma-buf registration support. |
tent/include/tent/runtime/transport_selector.h |
Adds IPC selection context. |
tent/include/tent/runtime/transfer_engine_impl.h |
Declares direct XPU planning helpers. |
tent/include/tent/runtime/platform.h |
Defines the generic dma-buf export API. |
tent/include/tent/platform/xpu.h |
Declares XPU dma-buf and IPC APIs. |
docs/source/getting_started/supported-protocols.md |
Documents XPU direct-transfer behavior. |
docs/source/getting_started/build.md |
Documents XPU build and runtime requirements. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
59c68b0 to
39d5c7e
Compare
39d5c7e to
daad0db
Compare
|
The TENT CI checks are passing; the remaining failure comes from an upstream Store test that leaves its injected write failure enabled, unrelated to the XPU changes. |
daad0db to
c9f5f75
Compare
XPU P/D landed on NIXL (sgl-project#24188), but the XPU CI image does not install NIXL, so its registered test could not run. This builds both the Mooncake transfer engine and NIXL into the image and runs the registered XPU P/D test on both backends. docker/xpu.Dockerfile builds the Mooncake transfer engine from a pinned upstream commit with icpx (-DUSE_XPU=ON -DUSE_TENT=ON -DWITH_STORE=OFF; the store does not build with icpx at that commit) and installs sglang-router, which the P/D tests launch between prefill and decode. It also builds UCX from a pinned master commit (--with-ze --with-mlx5) into /opt/intel, a static Abseil 20250814.1 into /opt/intel/abseil, and NIXL from a pinned commit through NIXL's documented source install: the nixl-cu12 package, the C++ libraries and plugins, then the nixl meta package. Mooncake's dependencies.sh pulls in Ubuntu's libabsl-dev 20220623, too old for NIXL (VLOG not declared), so the Abseil build goes first on PKG_CONFIG_PATH. nixl-cu12 keeps a RUNPATH to the meson prefix, so pip and meson share --prefix=/opt/intel/intel_nixl. The image sets UCX_MEMTYPE_CACHE=n: without it UCX misdetects host buffers as ze-device memory and asserts in rma_rndv.c. test/registered/disaggregation/test_disaggregation_xpu.py runs both backends on nightly-xpu-kernel-main-2-gpu through a shared mixin. Mooncake sets MC_USE_TENT=1 and MOONCAKE_PROTOCOL=tcp, since CI has no RDMA NIC; TCP is temporary until kvcache-ai/Mooncake#4379 enables ze_ipc. NIXL sets UCX_MEMTYPE_CACHE=n. Each class fails, not skips, when its backend is not importable, so the nightly also checks that the image carries both builds. Decode keeps the default host_pool retraction backup now that sgl-project#32503 enables HiCache L1<->L2 transfer on XPU. scripts/ci/xpu/xpu_ci_start_container.sh adds --cap-add SYS_PTRACE: UCX's ze_ipc transport maps the peer process's device memory through pidfd_getfd(), which needs ptrace rights, so NIXL transfers fail with EPERM in a default container. MetadataBuffers no longer places metadata on "cuda" for SGLANG_MOONCAKE_CUSTOM_MEM_POOL=INTRA_NODE_NVLINK on XPU; CUDA, ROCm and other devices keep their existing behaviour. Docs: the XPU page's P/D section adds a Mooncake backend subsection (build or Docker image, MC_USE_TENT=1 and the temporary MOONCAKE_PROTOCOL=tcp, host-staged TCP transport, no Mooncake store so no HiCache L3, a full prefill/ decode example) and a backend column with Mooncake and NIXL nightly rows. The NIXL subsection now requires a UCX built with the Level Zero transport (the PyPI nixl wheel's bundled UCX has none) and sets UCX_MEMTYPE_CACHE=n. pd_disaggregation.mdx notes the XPU Mooncake and NIXL builds and that SGLANG_MOONCAKE_CUSTOM_MEM_POOL is CUDA-only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
XPU P/D landed on NIXL (sgl-project#24188), but the XPU CI image does not install NIXL, so its registered test could not run. This builds both the Mooncake transfer engine and NIXL into the image and runs the registered XPU P/D test on both backends. docker/xpu.Dockerfile builds the Mooncake transfer engine from a pinned upstream commit with icpx (-DUSE_XPU=ON -DUSE_TENT=ON -DWITH_STORE=OFF; the store does not build with icpx at that commit) and installs sglang-router, which the P/D tests launch between prefill and decode. It also builds UCX from a pinned master commit (--with-ze --with-mlx5) into its own prefix, /opt/ucx (NIXL finds it through its RUNPATH; no ld.so.conf entry), a static Abseil 20250814.1 into /opt/intel/abseil, and NIXL from a pinned commit through NIXL's documented source install: the nixl-cu12 package, the C++ libraries and plugins, then the nixl meta package. Mooncake's dependencies.sh pulls in Ubuntu's libabsl-dev 20220623, too old for NIXL (VLOG not declared), so the Abseil build goes first on PKG_CONFIG_PATH. nixl-cu12 keeps a RUNPATH to the meson prefix, so pip and meson share --prefix=/opt/intel/intel_nixl. The build-only pip packages are removed afterwards. The image sets UCX_MEMTYPE_CACHE=n: with the memtype cache on, UCX classifies XPU device memory as host and NIXL fails to register the KV cache (NIXL_ERR_BACKEND). test/registered/disaggregation/test_disaggregation_xpu.py runs both backends on nightly-xpu-kernel-main-2-gpu through a shared mixin. Mooncake sets MC_USE_TENT=1 and MOONCAKE_PROTOCOL=tcp, since CI has no RDMA NIC; TCP is temporary until kvcache-ai/Mooncake#4379 enables ze_ipc. NIXL sets UCX_MEMTYPE_CACHE=n. Each class fails, not skips, when its backend is not importable, so the nightly also checks that the image carries both builds. The mixin sets use_rdma = False, a new PDDisaggregationServerBase flag (default True, so CUDA tests are unchanged). With it, CI mode skips the NIC lookup, --disaggregation-ib-device and the MC_GID_INDEX/UCX_NET_DEVICES env. Without it the fixture hands both servers its CUDA-runner default NICs (mlx5_roce*) on the NIC-less XPU runners, and Mooncake refuses to start. get_rdma_devices_args() now counts cards with get_gpu_count() instead of torch.cuda.device_count(), so the card-to-NIC mapping is right off CUDA too; on CUDA the count is unchanged. Decode keeps the default host_pool retraction backup now that sgl-project#32503 enables HiCache L1<->L2 transfer on XPU. scripts/ci/xpu/xpu_ci_start_container.sh adds --cap-add SYS_PTRACE: UCX's ze_ipc transport maps the peer process's device memory through pidfd_getfd(), which needs ptrace rights, so NIXL transfers fail with EPERM in a default container. pr-test-xpu.yml drops test_disaggregation_xpu.py from its path filter, since the test now runs only in the nightly. MetadataBuffers no longer places metadata on "cuda" for SGLANG_MOONCAKE_CUSTOM_MEM_POOL=INTRA_NODE_NVLINK on XPU; CUDA, ROCm and other devices keep their existing behaviour. Docs: the XPU page's P/D section adds a Mooncake backend subsection (build or Docker image, MC_USE_TENT=1 and the temporary MOONCAKE_PROTOCOL=tcp, host-staged TCP transport, no Mooncake store so no HiCache L3, a full prefill/ decode example) and a backend column with Mooncake and NIXL nightly rows. The NIXL subsection now requires a UCX built with the Level Zero transport (the PyPI nixl wheel's bundled UCX has none), sets UCX_MEMTYPE_CACHE=n, and says containers need --cap-add SYS_PTRACE. pd_disaggregation.mdx notes the XPU Mooncake and NIXL builds and that SGLANG_MOONCAKE_CUSTOM_MEM_POOL is CUDA-only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
XPU P/D landed on NIXL (sgl-project#24188), but the XPU CI image does not install NIXL, so its registered test could not run. This builds both the Mooncake transfer engine and NIXL into the image and runs the registered XPU P/D test on both backends. docker/xpu.Dockerfile builds the Mooncake transfer engine from a pinned upstream commit with icpx (-DUSE_XPU=ON -DUSE_TENT=ON -DWITH_STORE=OFF; the store does not build with icpx at that commit) and installs sglang-router, which the P/D tests launch between prefill and decode. Mooncake's dependencies.sh is run with libboost-dev in place of libboost-all-dev, which pulls OpenMPI, libfabric and Ubuntu's UCX 1.16; Mooncake, store and P2P included, uses only header-only Boost. It also builds UCX from a pinned master commit (--with-ze --with-mlx5) into its own prefix, /opt/ucx (NIXL finds it through its RUNPATH; no ld.so.conf entry), a static Abseil 20250814.1 into /opt/intel/abseil, and NIXL from a pinned commit through NIXL's documented source install: the nixl-cu12 package, the C++ libraries and plugins, then the nixl meta package. Mooncake's dependencies.sh pulls in Ubuntu's libabsl-dev 20220623, too old for NIXL (VLOG not declared), so the Abseil build goes first on PKG_CONFIG_PATH. nixl-cu12 keeps a RUNPATH to the meson prefix, so pip and meson share --prefix=/opt/intel/intel_nixl. The build-only pip packages are removed afterwards. The image sets UCX_MEMTYPE_CACHE=n: with the memtype cache on, UCX classifies XPU device memory as host and NIXL fails to register the KV cache (NIXL_ERR_BACKEND). test/registered/disaggregation/test_disaggregation_xpu.py runs both backends on nightly-xpu-kernel-main-2-gpu through a shared mixin. Mooncake sets MC_USE_TENT=1 and MOONCAKE_PROTOCOL=tcp, since CI has no RDMA NIC; TCP is temporary until kvcache-ai/Mooncake#4379 enables ze_ipc. NIXL sets UCX_MEMTYPE_CACHE=n. Each class fails, not skips, when its backend is not importable, so the nightly also checks that the image carries both builds. The mixin sets use_rdma = False, a new PDDisaggregationServerBase flag (default True, so CUDA tests are unchanged). With it, CI mode skips the NIC lookup, --disaggregation-ib-device and the MC_GID_INDEX/UCX_NET_DEVICES env. Without it the fixture hands both servers its CUDA-runner default NICs (mlx5_roce*) on the NIC-less XPU runners, and Mooncake refuses to start. get_rdma_devices_args() now counts cards with get_gpu_count() instead of torch.cuda.device_count(), so the card-to-NIC mapping is right off CUDA too; on CUDA the count is unchanged. Decode keeps the default host_pool retraction backup now that sgl-project#32503 enables HiCache L1<->L2 transfer on XPU. scripts/ci/xpu/xpu_ci_start_container.sh adds --cap-add SYS_PTRACE: UCX's ze_ipc transport maps the peer process's device memory through pidfd_getfd(), which needs ptrace rights, so NIXL transfers fail with EPERM in a default container. pr-test-xpu.yml drops test_disaggregation_xpu.py from its path filter, since the test now runs only in the nightly. MetadataBuffers no longer places metadata on "cuda" for SGLANG_MOONCAKE_CUSTOM_MEM_POOL=INTRA_NODE_NVLINK on XPU; CUDA, ROCm and other devices keep their existing behaviour. Docs: the XPU page's P/D section adds a Mooncake backend subsection (build or Docker image, MC_USE_TENT=1 and the temporary MOONCAKE_PROTOCOL=tcp, host-staged TCP transport, no Mooncake store so no HiCache L3, a full prefill/ decode example) and a backend column with Mooncake and NIXL nightly rows. The NIXL subsection now requires a UCX built with the Level Zero transport (the PyPI nixl wheel's bundled UCX has none), sets UCX_MEMTYPE_CACHE=n, and says containers need --cap-add SYS_PTRACE. pd_disaggregation.mdx notes the XPU Mooncake and NIXL builds and that SGLANG_MOONCAKE_CUSTOM_MEM_POOL is CUDA-only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
XPU P/D landed on NIXL (sgl-project#24188), but the XPU CI image does not install NIXL, so its registered test could not run. This builds both the Mooncake transfer engine and NIXL into the image and runs the registered XPU P/D test on both backends. docker/xpu.Dockerfile builds the Mooncake transfer engine from a pinned upstream commit with icpx (-DUSE_XPU=ON -DUSE_TENT=ON -DWITH_STORE=OFF; the store does not build with icpx at that commit) and installs sglang-router, which the P/D tests launch between prefill and decode. Mooncake's dependencies.sh is run with libboost-dev in place of libboost-all-dev, which pulls OpenMPI, libfabric and Ubuntu's UCX 1.16; Mooncake, store and P2P included, uses only header-only Boost. A grep guard fails the build if a MOONCAKE_COMMIT bump renames that line. It also builds UCX from a pinned master commit (--with-ze --with-mlx5) into its own prefix, /opt/ucx (NIXL finds it through its RUNPATH; no ld.so.conf entry), a static Abseil 20250814.1 into /opt/intel/abseil, and NIXL from a pinned commit through NIXL's documented source install: the nixl-cu12 package, the C++ libraries and plugins, then the nixl meta package. Mooncake's dependencies.sh pulls in Ubuntu's libabsl-dev 20220623, too old for NIXL (VLOG not declared), so the Abseil build goes first on PKG_CONFIG_PATH. nixl-cu12 keeps a RUNPATH to the meson prefix, so pip and meson share --prefix=/opt/intel/intel_nixl. The build-only pip packages are removed afterwards. The image sets UCX_MEMTYPE_CACHE=n: with the memtype cache on, UCX classifies XPU device memory as host and NIXL fails to register the KV cache (NIXL_ERR_BACKEND). test/registered/disaggregation/test_disaggregation_xpu.py runs both backends on nightly-xpu-kernel-main-2-gpu through a shared mixin. Mooncake sets MC_USE_TENT=1 and MOONCAKE_PROTOCOL=tcp, since CI has no RDMA NIC; TCP is temporary until kvcache-ai/Mooncake#4379 enables ze_ipc. NIXL sets UCX_MEMTYPE_CACHE=n. Each class fails, not skips, when its backend is not importable, so the nightly also checks that the image carries both builds. The mixin sets use_rdma = False, a new PDDisaggregationServerBase flag (default True, so CUDA tests are unchanged). With it, CI mode skips the NIC lookup, --disaggregation-ib-device and the MC_GID_INDEX/UCX_NET_DEVICES env. Without it the fixture hands both servers its CUDA-runner default NICs (mlx5_roce*) on the NIC-less XPU runners, and Mooncake refuses to start. get_rdma_devices_args() now counts cards with get_gpu_count() instead of torch.cuda.device_count(), so the card-to-NIC mapping is right off CUDA too; on CUDA the count is unchanged. Decode keeps the default host_pool retraction backup now that sgl-project#32503 enables HiCache L1<->L2 transfer on XPU. scripts/ci/xpu/xpu_ci_start_container.sh adds --cap-add SYS_PTRACE: UCX's ze_ipc transport maps the peer process's device memory through pidfd_getfd(), which needs ptrace rights, so NIXL transfers fail with EPERM in a default container. pr-test-xpu.yml drops test_disaggregation_xpu.py from its path filter, since the test now runs only in the nightly. Server-args validation now rejects SGLANG_MOONCAKE_CUSTOM_MEM_POOL on --device xpu when it enables a pool: Mooncake's pools use CUDA allocators, which XPU lacks. Values that leave the pool off are accepted, and CUDA, ROCm, MUSA and Ascend NPU keep their existing behaviour. Docs: the XPU page's P/D section adds a Mooncake backend subsection (build or Docker image, MC_USE_TENT=1 and the temporary MOONCAKE_PROTOCOL=tcp, host-staged TCP transport, no Mooncake store so no HiCache L3, a full prefill/ decode example) and a backend column with Mooncake and NIXL nightly rows. The NIXL subsection now requires a UCX built with the Level Zero transport (the PyPI nixl wheel's bundled UCX has none), sets UCX_MEMTYPE_CACHE=n, and says containers need --cap-add SYS_PTRACE. pd_disaggregation.mdx notes the XPU Mooncake and NIXL builds and that SGLANG_MOONCAKE_CUSTOM_MEM_POOL is CUDA-only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
XPU P/D landed on NIXL (sgl-project#24188), but the XPU CI image does not install NIXL, so its registered test could not run. This builds both the Mooncake transfer engine and NIXL into the image and runs the registered XPU P/D test on both backends. docker/xpu.Dockerfile builds the Mooncake transfer engine from a pinned upstream commit with icpx (-DUSE_XPU=ON -DUSE_TENT=ON -DWITH_STORE=OFF; the store does not build with icpx at that commit) and installs sglang-router, which the P/D tests launch between prefill and decode. Mooncake's dependencies.sh is run with libboost-dev in place of libboost-all-dev, which pulls OpenMPI, libfabric and Ubuntu's UCX 1.16; Mooncake, store and P2P included, uses only header-only Boost. A grep anchored to the package entry fails the build if a MOONCAKE_COMMIT bump renames or drops it. It also builds UCX from a pinned master commit (--with-ze --with-mlx5) into its own prefix, /opt/ucx (NIXL finds it through its RUNPATH; no ld.so.conf entry), a static Abseil 20250814.1 into /opt/intel/abseil, and NIXL from a pinned commit through NIXL's documented source install: the nixl-cu12 package, the C++ libraries and plugins, then the nixl meta package. Mooncake's dependencies.sh pulls in Ubuntu's libabsl-dev 20220623, too old for NIXL (VLOG not declared), so the Abseil build goes first on PKG_CONFIG_PATH. nixl-cu12 keeps a RUNPATH to the meson prefix, so pip and meson share --prefix=/opt/intel/intel_nixl. The build-only pip packages are removed afterwards. The image sets UCX_MEMTYPE_CACHE=n: with the memtype cache on, UCX classifies XPU device memory as host and NIXL fails to register the KV cache (NIXL_ERR_BACKEND). test/registered/disaggregation/test_disaggregation_xpu.py runs both backends on nightly-xpu-kernel-main-2-gpu through a shared mixin. Mooncake sets MC_USE_TENT=1 and MOONCAKE_PROTOCOL=tcp, since CI has no RDMA NIC; TCP is temporary until kvcache-ai/Mooncake#4379 enables ze_ipc. NIXL sets UCX_MEMTYPE_CACHE=n. Each class fails, not skips, when its backend is not importable, so the nightly also checks that the image carries both builds. The mixin sets use_rdma = False, a new PDDisaggregationServerBase flag (default True, so CUDA tests are unchanged). With it, CI mode skips the NIC lookup, --disaggregation-ib-device and the MC_GID_INDEX/UCX_NET_DEVICES env. Without it the fixture hands both servers its CUDA-runner default NICs (mlx5_roce*) on the NIC-less XPU runners, and Mooncake refuses to start. get_rdma_devices_args() now counts cards with get_gpu_count() instead of torch.cuda.device_count(), so the card-to-NIC mapping is right off CUDA too; on CUDA the count is unchanged. Decode keeps the default host_pool retraction backup now that sgl-project#32503 enables HiCache L1<->L2 transfer on XPU. scripts/ci/xpu/xpu_ci_start_container.sh adds --cap-add SYS_PTRACE: UCX's ze_ipc transport maps the peer process's device memory through pidfd_getfd(), which needs ptrace rights, so NIXL transfers fail with EPERM in a default container. pr-test-xpu.yml drops test_disaggregation_xpu.py from its path filter, since the test now runs only in the nightly. Server-args validation now rejects SGLANG_MOONCAKE_CUSTOM_MEM_POOL on --device xpu when it enables a pool: Mooncake's pools use CUDA allocators, which XPU lacks. Values that leave the pool off are accepted, and CUDA, ROCm, MUSA and Ascend NPU keep their existing behaviour. Docs: the XPU page's P/D section adds a Mooncake backend subsection (build or Docker image, MC_USE_TENT=1 and the temporary MOONCAKE_PROTOCOL=tcp, host-staged TCP transport, no Mooncake store so no HiCache L3, a full prefill/ decode example) and a backend column with Mooncake and NIXL nightly rows. The NIXL subsection now requires a UCX built with the Level Zero transport (the PyPI nixl wheel's bundled UCX has none), sets UCX_MEMTYPE_CACHE=n, and says containers need --cap-add SYS_PTRACE. pd_disaggregation.mdx notes the XPU Mooncake and NIXL builds and that SGLANG_MOONCAKE_CUSTOM_MEM_POOL is CUDA-only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
XPU P/D landed on NIXL (sgl-project#24188), but the XPU CI image does not install NIXL, so its registered test could not run. This builds both the Mooncake transfer engine and NIXL into the image and runs the registered XPU P/D test on both backends. docker/xpu.Dockerfile builds the Mooncake transfer engine from a pinned upstream commit with icpx (-DUSE_XPU=ON -DUSE_TENT=ON -DWITH_STORE=OFF; the store does not build with icpx at that commit) and installs sglang-router, which the P/D tests launch between prefill and decode. Mooncake's dependencies.sh is run with libboost-dev in place of libboost-all-dev, which pulls OpenMPI, libfabric and Ubuntu's UCX 1.16; Mooncake, store and P2P included, uses only header-only Boost. A grep anchored to the package entry fails the build if a MOONCAKE_COMMIT bump renames or drops it. It also builds UCX from a pinned master commit (--with-ze --with-mlx5) into its own prefix, /opt/ucx (NIXL finds it through its RUNPATH; no ld.so.conf entry), a static Abseil 20250814.1 into /opt/intel/abseil, and NIXL from a pinned commit through NIXL's documented source install: the nixl-cu12 package, the C++ libraries and plugins, then the nixl meta package. Mooncake's dependencies.sh pulls in Ubuntu's libabsl-dev 20220623, too old for NIXL (VLOG not declared), so the Abseil build goes first on PKG_CONFIG_PATH. nixl-cu12 keeps a RUNPATH to the meson prefix, so pip and meson share --prefix=/opt/intel/intel_nixl. The build-only pip packages are removed afterwards. The image sets UCX_MEMTYPE_CACHE=n: with the memtype cache on, UCX classifies XPU device memory as host and NIXL fails to register the KV cache (NIXL_ERR_BACKEND). test/registered/disaggregation/test_disaggregation_xpu.py runs both backends on nightly-xpu-kernel-main-2-gpu through a shared mixin. Mooncake sets MC_USE_TENT=1 and MOONCAKE_PROTOCOL=tcp, since CI has no RDMA NIC; TCP is temporary until kvcache-ai/Mooncake#4379 enables ze_ipc. NIXL sets UCX_MEMTYPE_CACHE=n. Each class fails, not skips, when its backend is not importable, so the nightly also checks that the image carries both builds. The mixin sets use_rdma = False, a new PDDisaggregationServerBase flag (default True, so CUDA tests are unchanged). With it, CI mode skips the NIC lookup, --disaggregation-ib-device and the MC_GID_INDEX/UCX_NET_DEVICES env. Without it the fixture hands both servers its CUDA-runner default NICs (mlx5_roce*) on the NIC-less XPU runners, and Mooncake refuses to start. get_rdma_devices_args() now counts cards with get_gpu_count() instead of torch.cuda.device_count(), so the card-to-NIC mapping is right off CUDA too; on CUDA the count is unchanged. Decode keeps the default host_pool retraction backup now that sgl-project#32503 enables HiCache L1<->L2 transfer on XPU. scripts/ci/xpu/xpu_ci_start_container.sh adds --cap-add SYS_PTRACE: UCX's ze_ipc transport maps the peer process's device memory through pidfd_getfd(), which needs ptrace rights, so NIXL transfers fail with EPERM in a default container. pr-test-xpu.yml drops test_disaggregation_xpu.py from its path filter, since the test now runs only in the nightly. Server-args validation now rejects SGLANG_MOONCAKE_CUSTOM_MEM_POOL on --device xpu when it enables a pool: Mooncake's pools use CUDA allocators, which XPU lacks. Values that leave the pool off are accepted, and CUDA, ROCm, MUSA and Ascend NPU keep their existing behaviour. Docs: the XPU page's P/D section adds a Mooncake backend subsection (build or Docker image, MC_USE_TENT=1 and the temporary MOONCAKE_PROTOCOL=tcp, host-staged TCP transport, no Mooncake store so no HiCache L3, a full prefill/ decode example) and a backend column with Mooncake and NIXL nightly rows. The NIXL subsection now requires a UCX built with the Level Zero transport (the PyPI nixl wheel's bundled UCX has none), sets UCX_MEMTYPE_CACHE=n, and says containers need --cap-add SYS_PTRACE. pd_disaggregation.mdx notes the XPU Mooncake and NIXL builds and that SGLANG_MOONCAKE_CUSTOM_MEM_POOL is CUDA-only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
XPU P/D landed on NIXL (sgl-project#24188), but the XPU CI image does not install NIXL, so its registered test could not run. This builds both the Mooncake transfer engine and NIXL into the image and runs the registered XPU P/D test on both backends. docker/xpu.Dockerfile builds the Mooncake transfer engine from a pinned upstream commit with icpx (-DUSE_XPU=ON -DUSE_TENT=ON -DWITH_STORE=OFF; the store does not build with icpx at that commit) and installs sglang-router, which the P/D tests launch between prefill and decode. Mooncake's dependencies.sh is run with libboost-dev in place of libboost-all-dev, which pulls OpenMPI, libfabric and Ubuntu's UCX 1.16; Mooncake, store and P2P included, uses only header-only Boost. A grep anchored to the package entry fails the build if a MOONCAKE_COMMIT bump renames or drops it. It also builds UCX from a pinned master commit (--with-ze --with-mlx5) into its own prefix, /opt/ucx (NIXL finds it through its RUNPATH; no ld.so.conf entry), a static Abseil 20250814.1 into /opt/intel/abseil, and NIXL from a pinned commit through NIXL's documented source install: the nixl-cu12 package, the C++ libraries and plugins, then the nixl meta package. Mooncake's dependencies.sh pulls in Ubuntu's libabsl-dev 20220623, too old for NIXL (VLOG not declared), so the Abseil build goes first on PKG_CONFIG_PATH. nixl-cu12 keeps a RUNPATH to the meson prefix, so pip and meson share --prefix=/opt/intel/intel_nixl. The build-only pip packages are removed afterwards. The image sets UCX_MEMTYPE_CACHE=n: with the memtype cache on, UCX classifies XPU device memory as host and NIXL fails to register the KV cache (NIXL_ERR_BACKEND). test/registered/disaggregation/test_disaggregation_xpu.py runs both backends on nightly-xpu-kernel-main-2-gpu through a shared mixin. Mooncake sets MC_USE_TENT=1 and MOONCAKE_PROTOCOL=tcp, since CI has no RDMA NIC; TCP is temporary until kvcache-ai/Mooncake#4379 enables ze_ipc. NIXL sets UCX_MEMTYPE_CACHE=n. Each class fails, not skips, when its backend is not importable, so the nightly also checks that the image carries both builds. The mixin sets use_rdma = False, a new PDDisaggregationServerBase flag (default True, so CUDA tests are unchanged). With it, CI mode skips the NIC lookup, --disaggregation-ib-device and the MC_GID_INDEX/UCX_NET_DEVICES env. Without it the fixture hands both servers its CUDA-runner default NICs (mlx5_roce*) on the NIC-less XPU runners, and Mooncake refuses to start. get_rdma_devices_args() now counts cards with get_gpu_count() instead of torch.cuda.device_count(), so the card-to-NIC mapping is right off CUDA too; on CUDA the count is unchanged. Decode keeps the default host_pool retraction backup now that sgl-project#32503 enables HiCache L1<->L2 transfer on XPU. scripts/ci/xpu/xpu_ci_start_container.sh adds --cap-add SYS_PTRACE: UCX's ze_ipc transport maps the peer process's device memory through pidfd_getfd(), which needs ptrace rights, so NIXL transfers fail with EPERM in a default container. pr-test-xpu.yml drops test_disaggregation_xpu.py from its path filter, since the test now runs only in the nightly. Server-args validation now rejects SGLANG_MOONCAKE_CUSTOM_MEM_POOL on --device xpu when it enables a pool: Mooncake's pools use CUDA allocators, which XPU lacks. Values that leave the pool off are accepted, and CUDA, ROCm, MUSA and Ascend NPU keep their existing behaviour. Docs: the XPU page's P/D section adds a Mooncake backend subsection (build or Docker image, MC_USE_TENT=1 and the temporary MOONCAKE_PROTOCOL=tcp, host-staged TCP transport, no Mooncake store so no HiCache L3, a full prefill/ decode example) and a backend column with Mooncake and NIXL nightly rows. The NIXL subsection now requires a UCX built with the Level Zero transport (the PyPI nixl wheel's bundled UCX has none), sets UCX_MEMTYPE_CACHE=n, and says containers need --cap-add SYS_PTRACE. pd_disaggregation.mdx notes the XPU Mooncake and NIXL builds and that SGLANG_MOONCAKE_CUSTOM_MEM_POOL is CUDA-only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
VRAM-to-VRAM transfers between Intel XPUs on the same node previously went through host memory, and between processes through the network transport. This teaches the XPU platform and transport to copy directly. Within one process: - XpuSyclBackend::init() probes every ordered pair of Level Zero devices with sycl_ext_oneapi_peer_access and records a peer matrix; copyD2D() issues one queue::memcpy on the accessing device when peer access exists and bounces through host memory in 8 MB chunks otherwise. - init() keeps only the Level Zero view of each GPU (the OpenCL adapter exposes duplicates and ur_die-aborts on peer-access queries), and the peer probe no longer hides behind SYCL_EXT_ONEAPI_PEER_ACCESS, which icpx 2026.1 does not define. - XpuTransport advertises gpu_to_gpu and accepts device-to-device requests; XpuPlatform::copy() device->device succeeds. Across processes on the same node (e.g. prefill and decode workers): - XpuPlatform gains exportIpc / importIpc / closeImport over Level Zero IPC handles. The importer fetches the exporter's dma-buf descriptor with pidfd_getfd(2) and rewrites the handle so the compute runtime takes its fd import path; the opaque-handle path keeps a per-fd import cache that is never invalidated and maps stale buffers once the exporter reallocates. - Segment metadata carries "<pid>-<base>-<size>-<handle>-<pidns>" as the XPU transport attribute; the selector routes same-machine XPU targets that carry it through the XPU transport, and the transport maps the peer buffer on first use. - `transports/xpu/disable_ipc` turns the mechanism off; import failures (e.g. missing ptrace permission) fall back to the network path. Tests: platform D2D copies and IPC round trips, transport D2D, two-engine same-process IPC transfers, a fork+exec cross-process test, selector routing. Docs: build option, GPU-Direct admonition and supported-protocols note (IPC path and its CAP_SYS_PTRACE / ptrace_scope requirement).
XPU P/D landed on NIXL (sgl-project#24188), but the XPU CI image does not install NIXL, so its registered test could not run. This builds both the Mooncake transfer engine and NIXL into the image and runs the registered XPU P/D test on both backends. docker/xpu.Dockerfile builds the Mooncake transfer engine from a pinned upstream commit with icpx (-DUSE_XPU=ON -DUSE_TENT=ON -DWITH_STORE=OFF; the store does not build with icpx at that commit) and installs sglang-router, which the P/D tests launch between prefill and decode. Mooncake's dependencies.sh is run with libboost-dev in place of libboost-all-dev, which pulls OpenMPI, libfabric and Ubuntu's UCX 1.16; Mooncake, store and P2P included, uses only header-only Boost. A grep anchored to the package entry fails the build if a MOONCAKE_COMMIT bump renames or drops it. It also builds UCX from a pinned master commit (--with-ze --with-mlx5) into its own prefix, /opt/ucx (NIXL finds it through its RUNPATH; no ld.so.conf entry), a static Abseil 20250814.1 into /opt/intel/abseil, and NIXL from a pinned commit through NIXL's documented source install: the nixl-cu12 package, the C++ libraries and plugins, then the nixl meta package. Mooncake's dependencies.sh pulls in Ubuntu's libabsl-dev 20220623, too old for NIXL (VLOG not declared), so the Abseil build goes first on PKG_CONFIG_PATH. nixl-cu12 keeps a RUNPATH to the meson prefix, so pip and meson share --prefix=/opt/intel/intel_nixl. The build-only pip packages are removed afterwards. The image sets UCX_MEMTYPE_CACHE=n: with the memtype cache on, UCX classifies XPU device memory as host and NIXL fails to register the KV cache (NIXL_ERR_BACKEND). test/registered/disaggregation/test_disaggregation_xpu.py runs both backends on nightly-xpu-kernel-main-2-gpu through a shared mixin. Mooncake sets MC_USE_TENT=1 and MOONCAKE_PROTOCOL=tcp, since CI has no RDMA NIC; TCP is temporary until kvcache-ai/Mooncake#4379 enables ze_ipc. NIXL sets UCX_MEMTYPE_CACHE=n. Each class fails, not skips, when its backend is not importable, so the nightly also checks that the image carries both builds. The mixin sets use_rdma = False, a new PDDisaggregationServerBase flag (default True, so CUDA tests are unchanged). With it, CI mode skips the NIC lookup, --disaggregation-ib-device and the MC_GID_INDEX/UCX_NET_DEVICES env. Without it the fixture hands both servers its CUDA-runner default NICs (mlx5_roce*) on the NIC-less XPU runners, and Mooncake refuses to start. get_rdma_devices_args() now counts cards with get_gpu_count() instead of torch.cuda.device_count(), so the card-to-NIC mapping is right off CUDA too; on CUDA the count is unchanged. Decode keeps the default host_pool retraction backup now that sgl-project#32503 enables HiCache L1<->L2 transfer on XPU. scripts/ci/xpu/xpu_ci_start_container.sh adds --cap-add SYS_PTRACE: UCX's ze_ipc transport maps the peer process's device memory through pidfd_getfd(), which needs ptrace rights, so NIXL transfers fail with EPERM in a default container. pr-test-xpu.yml drops test_disaggregation_xpu.py from its path filter, since the test now runs only in the nightly. Server-args validation now rejects SGLANG_MOONCAKE_CUSTOM_MEM_POOL on --device xpu when it enables a pool: Mooncake's pools use CUDA allocators, which XPU lacks. Values that leave the pool off are accepted, and CUDA, ROCm, MUSA and Ascend NPU keep their existing behaviour. Docs: the XPU page's P/D section adds a Mooncake backend subsection (build or Docker image, MC_USE_TENT=1 and the temporary MOONCAKE_PROTOCOL=tcp, host-staged TCP transport, no Mooncake store so no HiCache L3, a full prefill/ decode example) and a backend column with Mooncake and NIXL nightly rows. The NIXL subsection now requires a UCX built with the Level Zero transport (the PyPI nixl wheel's bundled UCX has none), sets UCX_MEMTYPE_CACHE=n, and says containers need --cap-add SYS_PTRACE. pd_disaggregation.mdx notes the XPU Mooncake and NIXL builds and that SGLANG_MOONCAKE_CUSTOM_MEM_POOL is CUDA-only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
c9f5f75 to
6d8e80f
Compare
staryxchen
left a comment
There was a problem hiding this comment.
Single-GPU IPC looks right (generation, per-device negative cache, mapping kept across relocate/memcpy, ptrace documented). Three gaps: the success cache is not per device, imported dma-bufs live until process exit, and a policy that does not list "xpu" keeps the network path. Details inline.
Address review: cache imports per local device, reference-count mappings so dropped ones close after in-flight copies, drop imports on closeSegment or when the peer stops publishing a buffer, list xpu ahead of rdma in the default policy, and use overflow-safe range checks.
Address review: - Plan same-host XPU IPC without importing; the mapping is opened only when XPU is selected, and failover candidates behind it stay host-staged. A policy that does not list "xpu" never maps peer memory. - Publish the owning device UUID with each IPC handle and refuse imports on a local device without peer access to it; a host source maps on the owner device. - Order IPC attributes by a registration generation, so an older descriptor snapshot cannot unmap buffers registered after it. - Cache import failures per segment, prune them with the descriptor, and retry transient errnos. - Close the fetched dma-buf fd once the handle is opened, verify the mapped size, and hold the backend lock only for bookkeeping. - Reject exportIpc ranges whose end wraps; use F_DUPFD_CLOEXEC and guard the pidfd syscalls.
|
@staryxchen Thanks for the detailed review! All four points are addressed in the latest commits. On 2× Arc Pro B60 (same host, Level Zero IPC), the XPU platform, transport, IPC-process and engine tests pass, including the new ones. The CPU TENT suites also pass. |
XPU P/D landed on NIXL (sgl-project#24188), but the XPU CI image does not install NIXL, so its registered test could not run. This builds both the Mooncake transfer engine and NIXL into the image and runs the registered XPU P/D test on both backends. docker/xpu.Dockerfile builds the Mooncake transfer engine from a pinned upstream commit with icpx (-DUSE_XPU=ON -DUSE_TENT=ON -DWITH_STORE=OFF; the store does not build with icpx at that commit) and installs a pinned sglang-router, which the P/D tests launch between prefill and decode. Mooncake's dependencies.sh is run with libboost-dev in place of libboost-all-dev, which pulls OpenMPI, libfabric and Ubuntu's UCX 1.16; Mooncake, store and P2P included, uses only header-only Boost. A grep anchored to the package entry fails the build if a MOONCAKE_COMMIT bump renames or drops it. It also builds UCX from a pinned master commit (--with-ze --with-mlx5, --enable-optimizations), since ZE IPC for Intel GPUs (openucx/ucx#11218) is in no UCX release yet, into its own prefix, /opt/ucx (NIXL finds it through its RUNPATH; no ld.so.conf entry), a static Abseil 20250814.1 into /opt/abseil, and NIXL from a pinned commit through NIXL's documented source install: the nixl-cu12 package, the C++ libraries and plugins, then the nixl meta package. Mooncake's dependencies.sh pulls in Ubuntu's libabsl-dev 20220623, too old for NIXL (VLOG not declared), so the Abseil build goes first on PKG_CONFIG_PATH. nixl-cu12 keeps a RUNPATH to the meson prefix, so pip and meson share --prefix=/opt/nixl. Afterwards only the build tools the venv did not already have are removed, so packages sglang depends on (ninja, pyyaml) stay. The NIXL pin includes ai-dynamo/nixl#1536: its UCX plugin passes the VRAM memory type to UCX at registration, and the default auto hint selects ze-device on a ZE-only UCX, so UCX does not misclassify XPU memory as host (NIXL_ERR_BACKEND) and no UCX_MEMTYPE_CACHE override is needed. test/registered/disaggregation/test_disaggregation_xpu.py runs both backends on nightly-xpu-kernel-main-2-gpu through a shared mixin. Mooncake sets MC_USE_TENT=1 and MOONCAKE_PROTOCOL=tcp, since CI has no RDMA NIC; TCP is temporary until kvcache-ai/Mooncake#4379 enables ze_ipc. Both servers use the documented XPU attention backend, intel_xpu (page size 128), and prefill uses a 256-token chunk, so a ~1.1k-token greedy prompt that must recall a fact from its first page covers multi-page, multi-chunk KV transfer. Each class fails, not skips, when its backend is not importable, so the nightly also checks that the image carries both builds. In CI it also fails, rather than skips, when fewer than two XPUs are visible, so a runner with a missing card does not leave the nightly green; outside CI it still skips. The mixin sets use_rdma = False, a new PDDisaggregationServerBase flag (default True, so CUDA tests are unchanged). With it, CI mode skips the NIC lookup, --disaggregation-ib-device and the MC_GID_INDEX/UCX_NET_DEVICES env. Without it the fixture hands both servers its CUDA-runner default NICs (mlx5_roce*) on the NIC-less XPU runners, and Mooncake refuses to start. get_rdma_devices_args() now counts cards with get_gpu_count() instead of torch.cuda.device_count(), so the card-to-NIC mapping is right off CUDA too; on CUDA the count is unchanged. Decode keeps the default host_pool retraction backup now that sgl-project#32503 enables HiCache L1<->L2 transfer on XPU. scripts/ci/xpu/xpu_ci_start_container.sh adds --cap-add SYS_PTRACE: UCX's ze_ipc transport maps the peer process's device memory through pidfd_getfd(), which needs ptrace rights, so NIXL transfers fail with EPERM in a default container. pr-test-xpu.yml drops test_disaggregation_xpu.py from its path filter, since the test now runs only in the nightly. Server-args validation now rejects SGLANG_MOONCAKE_CUSTOM_MEM_POOL on --device xpu when it enables a pool: Mooncake's pools use CUDA allocators, which XPU lacks. Values that leave the pool off are accepted, and CUDA, ROCm, MUSA and Ascend NPU keep their existing behaviour. Docs: the XPU page's P/D section adds a Mooncake backend subsection (build or Docker image, MC_USE_TENT=1 and the temporary MOONCAKE_PROTOCOL=tcp, host-staged TCP transport, no Mooncake store so no HiCache L3, a full prefill/ decode example) and a backend column with Mooncake and NIXL nightly rows. The NIXL subsection now requires a UCX built with the Level Zero transport (the PyPI nixl wheel's bundled UCX has none) and says containers need --cap-add SYS_PTRACE. Its launch commands no longer set UCX_POSIX_USE_PROC_LINK=n, matching the nightly; the note now gives it as the fix if UCX's shared-memory transport cannot open a peer's /proc/<pid>/fd/<fd>. pd_disaggregation.mdx notes the XPU Mooncake and NIXL builds and that SGLANG_MOONCAKE_CUSTOM_MEM_POOL is CUDA-only.
XPU P/D landed on NIXL (sgl-project#24188), but the XPU CI image does not install NIXL, so its registered test could not run. This builds both the Mooncake transfer engine and NIXL into the image and runs the registered XPU P/D test on both backends. docker/xpu.Dockerfile builds the Mooncake transfer engine from a pinned upstream commit with icpx (-DUSE_XPU=ON -DUSE_TENT=ON -DWITH_STORE=OFF; the store does not build with icpx at that commit). The pin includes kvcache-ai/Mooncake#4379, so on one node TENT's XPU transport copies KV card to card through Level Zero IPC and no RDMA NIC is needed. The image also installs a pinned sglang-router, which the P/D tests launch between prefill and decode. Mooncake's dependencies.sh is run with libboost-dev in place of libboost-all-dev, which pulls OpenMPI, libfabric and Ubuntu's UCX 1.16; Mooncake, store and P2P included, uses only header-only Boost. A grep anchored to the package entry fails the build if a MOONCAKE_COMMIT bump renames or drops it. It also builds UCX from a pinned master commit (--with-ze --with-mlx5, --enable-optimizations), since ZE IPC for Intel GPUs (openucx/ucx#11218) is in no UCX release yet, into its own prefix, /opt/ucx (NIXL finds it through its RUNPATH; no ld.so.conf entry), a static Abseil 20250814.1 into /opt/abseil, and NIXL from a pinned commit through NIXL's documented source install: the nixl-cu12 package, the C++ libraries and plugins, then the nixl meta package. Mooncake's dependencies.sh pulls in Ubuntu's libabsl-dev 20220623, too old for NIXL (VLOG not declared), so the Abseil build goes first on PKG_CONFIG_PATH. nixl-cu12 keeps a RUNPATH to the meson prefix, so pip and meson share --prefix=/opt/nixl. Afterwards only the build tools the venv did not already have are removed, so packages sglang depends on (ninja, pyyaml) stay. The NIXL pin includes ai-dynamo/nixl#1536: its UCX plugin passes the VRAM memory type to UCX at registration, and the default auto hint selects ze-device on a ZE-only UCX, so UCX does not misclassify XPU memory as host (NIXL_ERR_BACKEND) and no UCX_MEMTYPE_CACHE override is needed. test/registered/disaggregation/test_disaggregation_xpu.py runs both backends on nightly-xpu-kernel-main-2-gpu through a shared mixin. Mooncake sets only MC_USE_TENT=1, so it copies KV card to card; both servers see both cards (same ZE_AFFINITY_MASK, decode on --base-gpu-id 1), which TENT needs for that. Both servers use the documented XPU attention backend, intel_xpu (page size 128), and prefill uses a 256-token chunk, so a ~1.1k-token greedy prompt that must recall a fact from its first page covers multi-page, multi-chunk KV transfer. Each class fails, not skips, when its backend is not importable, so the nightly also checks that the image carries both builds. In CI it also fails, rather than skips, when fewer than two XPUs are visible, so a runner with a missing card does not leave the nightly green; outside CI it still skips. The mixin sets use_rdma = False, a new PDDisaggregationServerBase flag (default True, so CUDA tests are unchanged). With it, CI mode skips the NIC lookup, --disaggregation-ib-device and the MC_GID_INDEX/UCX_NET_DEVICES env. Without it the fixture hands both servers its CUDA-runner default NICs (mlx5_roce*) on the NIC-less XPU runners, and Mooncake refuses to start. get_rdma_devices_args() now counts cards with get_gpu_count() instead of torch.cuda.device_count(), so the card-to-NIC mapping is right off CUDA too; on CUDA the count is unchanged. Decode keeps the default host_pool retraction backup now that sgl-project#32503 enables HiCache L1<->L2 transfer on XPU. scripts/ci/xpu/xpu_ci_start_container.sh adds --cap-add SYS_PTRACE: Level Zero IPC (NIXL's UCX ze_ipc and Mooncake's XPU transport) maps the peer process's device memory through pidfd_getfd(), which needs ptrace rights. In a default container NIXL transfers fail with EPERM, and Mooncake stops copying KV card to card. pr-test-xpu.yml drops test_disaggregation_xpu.py from its path filter, since the test now runs only in the nightly. Server-args validation now rejects SGLANG_MOONCAKE_CUSTOM_MEM_POOL on --device xpu when it enables a pool: Mooncake's pools use CUDA allocators, which XPU lacks. Values that leave the pool off are accepted, and CUDA, ROCm, MUSA and Ascend NPU keep their existing behaviour. Docs: the XPU page's P/D section adds a Mooncake backend subsection (build or Docker image, MC_USE_TENT=1, card-to-card copies that need both servers to see both cards and --cap-add SYS_PTRACE in containers, no Mooncake store so no HiCache L3, a prefill/decode example on ZE_AFFINITY_MASK=0,1) and a backend column with Mooncake and NIXL nightly rows. The NIXL subsection now requires a UCX built with the Level Zero transport (the PyPI nixl wheel's bundled UCX has none) and says containers need --cap-add SYS_PTRACE. Its launch commands no longer set UCX_POSIX_USE_PROC_LINK=n, matching the nightly; the note now gives it as the fix if UCX's shared-memory transport cannot open a peer's /proc/<pid>/fd/<fd>. pd_disaggregation.mdx notes the XPU Mooncake and NIXL builds and that SGLANG_MOONCAKE_CUSTOM_MEM_POOL is CUDA-only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
XPU P/D landed on NIXL (sgl-project#24188), but the XPU CI image does not install NIXL, so its registered test could not run. This builds both the Mooncake transfer engine and NIXL into the image and runs the registered XPU P/D test on both backends. docker/xpu.Dockerfile builds the Mooncake transfer engine from a pinned upstream commit with icpx (-DUSE_XPU=ON -DUSE_TENT=ON -DWITH_STORE=OFF; the store does not build with icpx at that commit). The pin includes kvcache-ai/Mooncake#4379, so on one node TENT's XPU transport copies KV card to card through Level Zero IPC and no RDMA NIC is needed. The image also installs a pinned sglang-router, which the P/D tests launch between prefill and decode. Mooncake's dependencies.sh is run with libboost-dev in place of libboost-all-dev, which pulls OpenMPI, libfabric and Ubuntu's UCX 1.16; Mooncake, store and P2P included, uses only header-only Boost. A grep anchored to the package entry fails the build if a MOONCAKE_COMMIT bump renames or drops it. It also builds UCX from a pinned master commit (--with-ze --with-mlx5, --enable-optimizations), since ZE IPC for Intel GPUs (openucx/ucx#11218) is in no UCX release yet, into its own prefix, /opt/ucx (NIXL finds it through its RUNPATH; no ld.so.conf entry), a static Abseil 20250814.1 into /opt/abseil, and NIXL from a pinned commit through NIXL's documented source install: the nixl-cu12 package, the C++ libraries and plugins, then the nixl meta package. Mooncake's dependencies.sh pulls in Ubuntu's libabsl-dev 20220623, too old for NIXL (VLOG not declared), so the Abseil build goes first on PKG_CONFIG_PATH. nixl-cu12 keeps a RUNPATH to the meson prefix, so pip and meson share --prefix=/opt/nixl. Afterwards only the build tools the venv did not already have are removed, so packages sglang depends on (ninja, pyyaml) stay. The NIXL pin includes ai-dynamo/nixl#1536: its UCX plugin passes the VRAM memory type to UCX at registration, and the default auto hint selects ze-device on a ZE-only UCX, so UCX does not misclassify XPU memory as host (NIXL_ERR_BACKEND) and no UCX_MEMTYPE_CACHE override is needed. test/registered/disaggregation/test_disaggregation_xpu.py runs both backends on nightly-xpu-kernel-main-2-gpu through a shared mixin. Mooncake sets only MC_USE_TENT=1, so it copies KV card to card; both servers see both cards (same ZE_AFFINITY_MASK, decode on --base-gpu-id 1), which TENT needs for that. Both servers use the documented XPU attention backend, intel_xpu (page size 128), and prefill uses a 256-token chunk, so a ~1.1k-token greedy prompt that must recall a fact from its first page covers multi-page, multi-chunk KV transfer. Each class fails, not skips, when its backend is not importable, so the nightly also checks that the image carries both builds. In CI it also fails, rather than skips, when fewer than two XPUs are visible, so a runner with a missing card does not leave the nightly green; outside CI it still skips. The mixin sets use_rdma = False, a new PDDisaggregationServerBase flag (default True, so CUDA tests are unchanged). With it, CI mode skips the NIC lookup, --disaggregation-ib-device and the MC_GID_INDEX/UCX_NET_DEVICES env. Without it the fixture hands both servers its CUDA-runner default NICs (mlx5_roce*) on the NIC-less XPU runners, and Mooncake refuses to start. get_rdma_devices_args() now counts cards with get_gpu_count() instead of torch.cuda.device_count(), so the card-to-NIC mapping is right off CUDA too; on CUDA the count is unchanged. Decode keeps the default host_pool retraction backup now that sgl-project#32503 enables HiCache L1<->L2 transfer on XPU. scripts/ci/xpu/xpu_ci_start_container.sh adds --cap-add SYS_PTRACE: Level Zero IPC (NIXL's UCX ze_ipc and Mooncake's XPU transport) maps the peer process's device memory through pidfd_getfd(), which needs ptrace rights. In a default container NIXL transfers fail with EPERM, and Mooncake stops copying KV card to card. pr-test-xpu.yml drops test_disaggregation_xpu.py from its path filter, since the test now runs only in the nightly. Server-args validation now rejects SGLANG_MOONCAKE_CUSTOM_MEM_POOL on --device xpu when it enables a pool: Mooncake's pools use CUDA allocators, which XPU lacks. Values that leave the pool off are accepted, and CUDA, ROCm, MUSA and Ascend NPU keep their existing behaviour. Docs: the XPU page's P/D section adds a Mooncake backend subsection (build or Docker image, MC_USE_TENT=1, card-to-card copies that need both servers to see both cards and --cap-add SYS_PTRACE in containers, no Mooncake store so no HiCache L3, a prefill/decode example on ZE_AFFINITY_MASK=0,1) and a backend column with Mooncake and NIXL nightly rows. The NIXL subsection now requires a UCX built with the Level Zero transport (the PyPI nixl wheel's bundled UCX has none) and says containers need --cap-add SYS_PTRACE. Its launch commands no longer set UCX_POSIX_USE_PROC_LINK=n, matching the nightly; the note now gives it as the fix if UCX's shared-memory transport cannot open a peer's /proc/<pid>/fd/<fd>. pd_disaggregation.mdx notes the XPU Mooncake and NIXL builds and that SGLANG_MOONCAKE_CUSTOM_MEM_POOL is CUDA-only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
XPU P/D landed on NIXL (sgl-project#24188), but the XPU CI image does not install NIXL, so its registered test could not run. This builds both the Mooncake transfer engine and NIXL into the image and runs the registered XPU P/D test on both backends. docker/xpu.Dockerfile builds the Mooncake transfer engine from a pinned upstream commit with icpx (-DUSE_XPU=ON -DUSE_TENT=ON -DWITH_STORE=OFF; the store does not build with icpx at that commit). The pin includes kvcache-ai/Mooncake#4379, so on one node TENT's XPU transport copies KV card to card through Level Zero IPC and no RDMA NIC is needed. The image also installs a pinned sglang-router, which the P/D tests launch between prefill and decode. Mooncake's dependencies.sh is run with libboost-dev in place of libboost-all-dev, which pulls OpenMPI, libfabric and Ubuntu's UCX 1.16; Mooncake, store and P2P included, uses only header-only Boost. A grep anchored to the package entry fails the build if a MOONCAKE_COMMIT bump renames or drops it. It also builds UCX from a pinned master commit (--with-ze --with-mlx5, --enable-optimizations), since ZE IPC for Intel GPUs (openucx/ucx#11218) is in no UCX release yet, into its own prefix, /opt/ucx (NIXL finds it through its RUNPATH; no ld.so.conf entry), a static Abseil 20250814.1 into /opt/abseil, and NIXL from a pinned commit through NIXL's documented source install: the nixl-cu12 package, the C++ libraries and plugins, then the nixl meta package. Mooncake's dependencies.sh pulls in Ubuntu's libabsl-dev 20220623, too old for NIXL (VLOG not declared), so the Abseil build goes first on PKG_CONFIG_PATH. nixl-cu12 keeps a RUNPATH to the meson prefix, so pip and meson share --prefix=/opt/nixl. Afterwards only the build tools the venv did not already have are removed, so packages sglang depends on (ninja, pyyaml) stay. The NIXL pin includes ai-dynamo/nixl#1536: its UCX plugin passes the VRAM memory type to UCX at registration, and the default auto hint selects ze-device on a ZE-only UCX, so UCX does not misclassify XPU memory as host (NIXL_ERR_BACKEND) and no UCX_MEMTYPE_CACHE override is needed. test/registered/disaggregation/test_disaggregation_xpu.py runs both backends on nightly-xpu-kernel-main-2-gpu through a shared mixin. Mooncake sets only MC_USE_TENT=1, so it copies KV card to card; both servers see both cards (same ZE_AFFINITY_MASK, decode on --base-gpu-id 1), which TENT needs for that. Both servers use the documented XPU attention backend, intel_xpu (page size 128), and prefill uses a 256-token chunk, so a ~1.1k-token greedy prompt that must recall a fact from its first page covers multi-page, multi-chunk KV transfer. Each class fails, not skips, when its backend is not importable, so the nightly also checks that the image carries both builds. In CI it also fails, rather than skips, when fewer than two XPUs are visible, so a runner with a missing card does not leave the nightly green; outside CI it still skips. The mixin sets use_rdma = False, a new PDDisaggregationServerBase flag (default True, so CUDA tests are unchanged). With it, CI mode skips the NIC lookup, --disaggregation-ib-device and the MC_GID_INDEX/UCX_NET_DEVICES env. Without it the fixture hands both servers its CUDA-runner default NICs (mlx5_roce*) on the NIC-less XPU runners, and Mooncake refuses to start. get_rdma_devices_args() now counts cards with get_gpu_count() instead of torch.cuda.device_count(), so the card-to-NIC mapping is right off CUDA too; on CUDA the count is unchanged. Decode keeps the default host_pool retraction backup now that sgl-project#32503 enables HiCache L1<->L2 transfer on XPU. scripts/ci/xpu/xpu_ci_start_container.sh adds --cap-add SYS_PTRACE: Level Zero IPC (NIXL's UCX ze_ipc and Mooncake's XPU transport) maps the peer process's device memory through pidfd_getfd(), which needs ptrace rights. In a default container NIXL transfers fail with EPERM, and Mooncake stops copying KV card to card. pr-test-xpu.yml drops test_disaggregation_xpu.py from its path filter, since the test now runs only in the nightly. Server-args validation now rejects SGLANG_MOONCAKE_CUSTOM_MEM_POOL on --device xpu when it enables a pool: Mooncake's pools use CUDA allocators, which XPU lacks. Values that leave the pool off are accepted, and CUDA, ROCm, MUSA and Ascend NPU keep their existing behaviour. Docs: the XPU page's P/D section adds a Mooncake backend subsection (build or Docker image, MC_USE_TENT=1, card-to-card copies that need both servers to see both cards and --cap-add SYS_PTRACE in containers, no Mooncake store so no HiCache L3, a prefill/decode example on ZE_AFFINITY_MASK=0,1) and a backend column with Mooncake and NIXL nightly rows. The NIXL subsection now requires a UCX built with the Level Zero transport (the PyPI nixl wheel's bundled UCX has none) and says containers need --cap-add SYS_PTRACE. Its launch commands no longer set UCX_POSIX_USE_PROC_LINK=n, matching the nightly; the note now gives it as the fix if UCX's shared-memory transport cannot open a peer's /proc/<pid>/fd/<fd>. pd_disaggregation.mdx notes the XPU Mooncake and NIXL builds and that SGLANG_MOONCAKE_CUSTOM_MEM_POOL is CUDA-only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
XPU P/D landed on NIXL (sgl-project#24188), but the XPU CI image does not install NIXL, so its registered test could not run. This builds both the Mooncake transfer engine and NIXL into the image and runs the registered XPU P/D test on both backends. docker/xpu.Dockerfile builds the Mooncake transfer engine from a pinned upstream commit with icpx (-DUSE_XPU=ON -DUSE_TENT=ON -DWITH_STORE=OFF; the store does not build with icpx at that commit). The pin includes kvcache-ai/Mooncake#4379, so on one node TENT's XPU transport copies KV card to card through Level Zero IPC and no RDMA NIC is needed. The image also installs a pinned sglang-router, which the P/D tests launch between prefill and decode. Mooncake's dependencies.sh is run with libboost-dev in place of libboost-all-dev, which pulls OpenMPI, libfabric and Ubuntu's UCX 1.16; Mooncake, store and P2P included, uses only header-only Boost. A grep anchored to the package entry fails the build if a MOONCAKE_COMMIT bump renames or drops it. It also builds UCX from a pinned master commit (--with-ze --with-mlx5, --enable-optimizations), since ZE IPC for Intel GPUs (openucx/ucx#11218) is in no UCX release yet, into its own prefix, /opt/ucx (NIXL finds it through its RUNPATH; no ld.so.conf entry), a static Abseil 20250814.1 into /opt/abseil, and NIXL from a pinned commit through NIXL's documented source install: the nixl-cu12 package, the C++ libraries and plugins, then the nixl meta package. Mooncake's dependencies.sh pulls in Ubuntu's libabsl-dev 20220623, too old for NIXL (VLOG not declared), so the Abseil build goes first on PKG_CONFIG_PATH. nixl-cu12 keeps a RUNPATH to the meson prefix, so pip and meson share --prefix=/opt/nixl. Afterwards only the build tools the venv did not already have are removed, so packages sglang depends on (ninja, pyyaml) stay. The NIXL pin includes ai-dynamo/nixl#1536: its UCX plugin passes the VRAM memory type to UCX at registration, and the default auto hint selects ze-device on a ZE-only UCX, so UCX does not misclassify XPU memory as host (NIXL_ERR_BACKEND) and no UCX_MEMTYPE_CACHE override is needed. test/registered/disaggregation/test_disaggregation_xpu.py runs both backends on nightly-xpu-kernel-main-2-gpu through a shared mixin. Mooncake sets only MC_USE_TENT=1, so it copies KV card to card; both servers see both cards (same ZE_AFFINITY_MASK, decode on --base-gpu-id 1), which TENT needs for that. Both servers use the documented XPU attention backend, intel_xpu (page size 128), and prefill uses a 256-token chunk, so a ~1.1k-token greedy prompt that must recall a fact from its first page covers multi-page, multi-chunk KV transfer. Each class fails, not skips, when its backend is not importable, so the nightly also checks that the image carries both builds. In CI it also fails, rather than skips, when fewer than two XPUs are visible, so a runner with a missing card does not leave the nightly green; outside CI it still skips. The mixin sets use_rdma = False, a new PDDisaggregationServerBase flag (default True, so CUDA tests are unchanged). With it, CI mode skips the NIC lookup, --disaggregation-ib-device and the MC_GID_INDEX/UCX_NET_DEVICES env. Without it the fixture hands both servers its CUDA-runner default NICs (mlx5_roce*) on the NIC-less XPU runners, and Mooncake refuses to start. get_rdma_devices_args() now counts cards with get_gpu_count() instead of torch.cuda.device_count(), so the card-to-NIC mapping is right off CUDA too; on CUDA the count is unchanged. Decode keeps the default host_pool retraction backup now that sgl-project#32503 enables HiCache L1<->L2 transfer on XPU. scripts/ci/xpu/xpu_ci_start_container.sh adds --cap-add SYS_PTRACE: Level Zero IPC (NIXL's UCX ze_ipc and Mooncake's XPU transport) maps the peer process's device memory through pidfd_getfd(), which needs ptrace rights. In a default container NIXL transfers fail with EPERM, and Mooncake stops copying KV card to card. pr-test-xpu.yml drops test_disaggregation_xpu.py from its path filter, since the test now runs only in the nightly. Server-args validation now rejects SGLANG_MOONCAKE_CUSTOM_MEM_POOL on --device xpu when it enables a pool: Mooncake's pools use CUDA allocators, which XPU lacks. Values that leave the pool off are accepted, and CUDA, ROCm, MUSA and Ascend NPU keep their existing behaviour. Docs: the XPU page's P/D section adds a Mooncake backend subsection (build or Docker image, MC_USE_TENT=1, card-to-card copies that need both servers to see both cards and --cap-add SYS_PTRACE in containers, no Mooncake store so no HiCache L3, a prefill/decode example on ZE_AFFINITY_MASK=0,1) and a backend column with Mooncake and NIXL nightly rows. The NIXL subsection now requires a UCX built with the Level Zero transport (the PyPI nixl wheel's bundled UCX has none) and says containers need --cap-add SYS_PTRACE. Its launch commands no longer set UCX_POSIX_USE_PROC_LINK=n, matching the nightly; the note now gives it as the fix if UCX's shared-memory transport cannot open a peer's /proc/<pid>/fd/<fd>. pd_disaggregation.mdx notes the XPU Mooncake and NIXL builds and that SGLANG_MOONCAKE_CUSTOM_MEM_POOL is CUDA-only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflicts with upstream main, resolved: - transfer_engine_impl.cpp, planTransport (getTransportType before kvcache-ai#4378): upstream added the XPU dma-buf RDMA (kvcache-ai#4378) and same-host XPU IPC (kvcache-ai#4379) routes. A request with a TPU side always stages and never takes either route; XPU and MLU requests behave as upstream. - transfer_engine_impl.cpp, findStagingPolicy: #2's combined TPU/XPU/MLU staging block replaces the old TPU case, with upstream's note on the XPU dma-buf bypass. XPU memory is no longer called never NIC-addressable. - transfer_engine_impl.cpp, submitTransfer: upstream's progress lock (kvcache-ai#4720) around #2's prepareSubmit call with the staged route. - tent/tests/CMakeLists.txt: #1's TPU adapter tests, then #2's engine, staged-route and host-initiator tests. Known failure: EngineFailoverE2E.MergedStagingRequestsShareOneSubmission (kvcache-ai#4797). The test marks the peer buffer as MLU only in the test thread's segment cache, which is thread-local. #2 re-plans a staged request's hop on the ProxyManager thread, whose cache shows host memory, so the hop gets no route.



Description
This is PR5 of the Intel XPU enablement series (RFC #4031; PR1 #4030 TENT
XPU platform, PR2 #4157 XPU transport + routing + host staging, PR3 #4270
Mooncake Store client, PR4 #4378 GPUDirect dma-buf RDMA). It adds intra-node
VRAM-to-VRAM copies between Intel XPUs to the Transfer Engine, using PCIe /
Xe Link peer access where the driver grants it and a host bounce otherwise —
within one process, and across processes on the same node via Level Zero IPC
handles.
Why. After PR2/PR4 the only way for two XPU processes on the same host
to exchange VRAM is through a network transport: dma-buf RDMA when an RNIC
is present, otherwise a D2H → TCP → H2D host bounce. This PR gives same-node
XPU↔XPU traffic a third route that needs neither:
deployed without RoCE. Today those nodes pay the host-staging path for
every KV transfer ([TENT] Add Intel XPU GPUDirect dma-buf RDMA to the Transfer Engine #4378 measured it at ~4 GB/s vs ~15 GB/s direct for a
64 MB read — and that was with an RNIC carrying the middle hop; over TCP
it is slower still, and it grows linearly with KV size); with this PR they
do a single PCIe/Xe Link copy.
movement no longer competes with genuine cross-node traffic for NIC
bandwidth or the NIC's PCIe lanes, and needs no RDMA queue pairs or MR
lookups per transfer.
copy runs at fabric rate rather than being capped at the NIC's line rate.
Not demonstrable on B60 (PCIe only), where the two routes are both
PCIe-bound and measure at parity — see results below.
The network routes are unchanged and remain the fallback: cross-node stays
on RDMA/staging, and any same-node import failure (typically missing ptrace
permission) falls back to them transparently.
transports/xpu/disable_ipcturns the new route off.
Platform (
platform/xpu)XpuSyclBackend::init()probes every ordered pair of Level Zero devices withsycl_ext_oneapi_peer_access(ext_oneapi_can_access_peer→ext_oneapi_enable_peer_access) and records an n×n peer matrix. Pairs thedriver refuses are simply left disabled.
XpuSyclBackend::copyD2D(): same device or peer access in eitherdirection → one
queue::memcpyon the accessing device (push from thesource, or pull from the destination); no peer access → chunked bounce
through host memory (8 MB chunks). Interior pointers resolve through the
existing allocation registry, foreign USM through
get_pointer_type.XpuPlatform::copy()device→device now succeeds (wasNotImplemented).depends on them:
OpenCL.
init()now keeps only the Level Zero view when one exists, so a2-GPU node advertises
xpu:0/xpu:1rather than four nodes. (The OpenCLadapter also
ur_die-aborts the process instead of throwing when askedabout peer access, so the probe is Level Zero only.)
SYCL_EXT_ONEAPI_PEER_ACCESSfeature macro; guarding on it silentlycompiled the whole probe out.
USE_XPUalready requires DPC++, so thecall is made unconditionally.
Transport / routing
XpuTransportadvertisesgpu_to_gpuandstartTransferaccepts requestswhere both sides are XPU VRAM (previously an error). Cross-node VRAM traffic
stays on RDMA (PR4) or staging (PR2).
Cross-process IPC
XpuPlatform::exportIpc / importIpc / closeImportwrapzeMemGetIpcHandle/zeMemOpenIpcHandle/zeMemCloseIpcHandle. Theimporter fetches the exporter's dma-buf descriptor itself with
pidfd_getfd(2)(likeMnnvlTransport) and rewrites the handle so thecompute runtime takes its plain fd import path. The runtime's opaque-handle
path keeps a per-(fd, pid, offset) import cache that is never invalidated
when the importer closes a mapping, so once the exporter frees and
reallocates onto the same fd number the peer silently maps the stale buffer;
the fd path has no such cache. Verified against intel/compute-runtime
source and reproduced on B60 with driver 1.17.
XpuTransport::addMemoryBufferpublishes"<pid>-<base>-<size>-<handle hex>-<pidns>-<generation>"as the XPUtransport attribute for every registered
xpu:*buffer (the generationcounts registrations, so a freed and reallocated buffer that comes back
with the same address, size and descriptor number is never mistaken for
the one already mapped);
prepareRemoteBuffermaps a peer's buffer onfirst use (same machine-id and pid namespace, range check, one mapping per
exporter allocation, negative cache per attribute and local device). A
mapping superseded by a re-registration is withdrawn from lookup but kept
until uninstall, since an in-flight transfer may still be copying through
it; uninstall closes everything.
TransportSelectorroutes a same-machine XPU target that carries theattribute through
XPUinstead of the host network transport; the enginepasses the mapped address to the local copy.
transports/xpu/disable_ipcturns this off; an import failure (
EPERMfrompidfd_getfdwhen Yamaptrace_scope≥ 2, a different user or a non-dumpable exporter) fallsback to the network path with a hint in the log. With the default
ptrace_scope1 no capability is needed: the Level Zero runtime marksits processes
PR_SET_PTRACER_ANY, so any same-user process in the pidnamespace may import.
Tests
xpu_platform_test:DeviceToDeviceCopyOnSameDevice,DeviceToDeviceCopyAcrossDevices(8 MB + interior offset, byte-exact; skipswith fewer than two devices),
ProbeDoesNotDuplicateGpusAcrossAdapters.xpu_transport_test:FailsWhenBothSidesAreDeviceMemoryreplaced byCopiesDeviceToDevice;ReRegistrationPublishesDistinctIpcAttribute.xpu_engine_test:XpuLocalDeviceCopyTest.{SameDevice,AcrossDevices}overall network/dispatch modes — route must be
XPUwith emptystaging_params, transfer completes and reads back the seed.transport_selector_test: local XPU↔XPU resolves toXPU; the same pairwith
local_segment=falseresolves toUNSPEC; a same-machine peercarrying the IPC attribute resolves to
XPU.xpu_platform_testexport/import round trips on the same and the peerdevice, refused ranges, stale-mapping regression;
xpu_engine_testXpuIpcEngineTest(two engines in one process, routeXPU, byte-exactread+write,
disable_ipcrestores the TCP route); newtent_xpu_ipc_process_testre-executes itself as a peer process andtransfers against the peer's VRAM (skips without a GPU or without ptrace
permission); its
XpuIpcFallbackTestfixture makes the peer non-dumpableso the import is refused and checks the engine quietly takes the staged
network route (skips when the test itself holds
CAP_SYS_PTRACE).Docs:
USE_XPUbuild option row, the GPU-Direct admonition and the IntelXPU note in supported-protocols (IPC path,
disable_ipc,ptrace_scoperequirement).
Module
mooncake-transfer-engine)mooncake-store)mooncake-conductor)mooncake-reshard)mooncake-ep)mooncake-pg)mooncake-integration)mooncake-p2p-store)mooncake-wheel)mooncake-common)mooncake-rl)Type of Change
How Has This Been Tested?
Test commands:
Test results:
can_access_peertrue both ways;pod with
CAP_SYS_PTRACE, hostptrace_scope=1):tent_xpu_platform_test18/18,tent_xpu_transport_test7/7,tent_xpu_engine_test91 pass / 5 skipped (pre-existing intentionalskips,
XpuDirectRdmaTestincluded in the passes),tent_xpu_ipc_process_test4 pass / 4 skipped (fallback fixture skipsunder
CAP_SYS_PTRACE),tent_transport_selector_testall pass.CAP_SYS_PTRACE(host
ptrace_scope=1):tent_xpu_engine_test84 pass / 12 skipped(RNIC-only skips),
XpuLocalDeviceCopyTest+XpuIpcEngineTeststableover 5 repeats;
tent_xpu_ipc_process_test8/8 — the IPC tests map thechild's buffer (runtime
PR_SET_PTRACER_ANY), the fallback tests getEPERMon the non-dumpable peer and take the staged route.and IPC tests skip.
USE_XPU=OFF): alltent_*ctest targets pass.(
MooncakeConnector, Qwen2.5-0.5B-Instruct, prefill on xpu:0 / decode onxpu:1 in the same pod,
MC_USE_TENT=1) with the engine built from thisbranch. Same-node KV blocks go through the IPC-mapped peer buffer — the
prefill worker logs one
XpuTransport: mapped peer buffer ... (13084131328 bytes) of segment <decode> ... on xpu:0and nocannot map peer buffer— and the decode side reportsprompt_tokens_by_source_total{source="external_kv_transfer"}growingwith every request. Outputs correct and identical to the
transports/xpu/disable_ipc=truerun, which never maps a peer buffer andstays on the PR4 dma-buf RDMA path (the pod had one RNIC).
No regression vs same-node RDMA: E2E for 8 sequential 2855-token
prefills (
max_tokens=1, second pass) is 126.0 ms IPC vs 125.7 msRDMA. Parity is expected on B60: both routes are bound by the GPU's PCIe
link, and this model moves only ~34 MB of KV per request (~2 ms of
transfer), so the E2E number is dominated by prefill compute. The
comparison shows the new route is safe to take by default when an RNIC
is present; the benefit is on nodes without one (see Why).
RNIC (TENT installs only the TCP transport). IPC route: READY in 115 s,
same output and the same 26051
external_kv_transfertokens, 8-prefillE2E medians 120.1 / 118.1 ms (two passes).
disable_ipc=true(hoststaging over TCP): identical output and token count, 322.8 / 230.6 ms.
Repeating the IPC run in a container without
CAP_SYS_PTRACEstill mapsthe peer buffer (124.7 / 102.2 ms, no
cannot mapwarning), confirmingthe default
ptrace_scope=1needs no extra capability.(
transfer_sync_read/writexpu:1 ↔ xpu:0, 20 iters, byte-exactverify) — IPC route vs dma-buf RDMA loopback through the NIC
(
disable_ipc): 16 MB read 22.3 / write 21.9 GB/s vs 20.9 / 18.6 GB/s;1 GB read 18.5 / write 22.6 GB/s vs 22.4 / 15.3 GB/s. Both sit at the
B60's PCIe ceiling.
faster than host-staged" measured on the same pod with a 512 MB
XpuPlatform::copyxpu:0 → xpu:1: 28.4 GB/s direct vs 9.5 GB/s forthe D2H + H2D staged equivalent (≈3×), readback byte-exact. A standalone
SYCL probe confirms
queue::memcpybetween the two B60s saturates the PCIelink at the same ~28 GB/s, and that
zeMemAllocDevice+ dma-buf exportallocations (PR4) copy P2P at the same rate as plain
malloc_device.Checklist
./scripts/code_format.shAI Assistance Disclosure
GitHub Copilot (Claude) assisted with drafting the peer-access / copyD2D code,
the tests and this description. All changes were reviewed, built and run on a
2-GPU Intel XPU node by the submitter.