Repository navigation
[TENT] Register unspecified XPU allocations with all enabled transports - #4881
XinyuYe-Intel wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The recorder can overwrite a valid baseline with metadata-only output and report success when all measurements are skipped.
1 open issue
What changed in this PR
Adds Intel XPU benchmarking to tebench as part of RFC #4031, with baseline recording and comparison tools plus a single-node Arc Pro B60 reference.
Changes:
- Supports XPU buffer allocation, transport registration, and data consistency checks.
- Adds baseline collection and throughput/p99 comparison scripts with unit tests.
- Documents XPU usage and records four DRAM/VRAM baseline pairs; RDMA and multi-node coverage remain separate.
| File | Description |
|---|---|
| scripts/tebench/tebench_compare.py | Compares throughput and p99 against recorded baselines. |
| scripts/tebench/record_baseline.sh | Collects per-pair read/write sweeps and metadata. |
| scripts/tebench/baselines/xpu-b60/vram-to-vram.jsonl | Records GPU-to-GPU baseline measurements. |
| scripts/tebench/baselines/xpu-b60/vram-to-dram.jsonl | Records GPU-to-host baseline measurements. |
| scripts/tebench/baselines/xpu-b60/dram-to-vram.jsonl | Records host-to-GPU baseline measurements. |
| scripts/tebench/baselines/xpu-b60/dram-to-dram.jsonl | Records host-to-host baseline measurements. |
| scripts/ci/tests/test_tebench_record_baseline.py | Tests recording, failure propagation, and metadata encoding. |
| scripts/ci/tests/test_tebench_compare.py | Tests comparison thresholds and input validation. |
| mooncake-transfer-engine/benchmark/utils.h | Adds XPU fill and verification dispatch. |
| mooncake-transfer-engine/benchmark/utils.cpp | Implements XPU memory detection and platform copies. |
| mooncake-transfer-engine/benchmark/tent_backend.cpp | Adds XPU device selection and buffer registration. |
| mooncake-transfer-engine/benchmark/CMakeLists.txt | Preserves compiler runtime paths for XPU help testing. |
| docs/source/performance/mooncake/tebench.md | Documents XPU usage, baseline workflow, and coverage limits. |
Review effort: Balanced
f6f7605 to
497af81
Compare
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
6 open issues
seg_typeis treated case-insensitively inresolveSegTypeParams("VRAM"or"vram"), but here… · New The bounds check treatslocal_gpu_idas an ordinal in[0, gpu_count), butgpu_countis… · New The bounds check treatslocal_gpu_idas an ordinal in[0, gpu_count), butgpu_countis… · New UsingLOG_ASSERTfor copy failure handling can behave differently across build modes depending on… · NewcopyXpuDatashould takeconst void* src(and ideallyvoid* dst, const void* src) for… · New The comment referenceste_backend.cpp, but the benchmark backend file in this PR is… · New
1 resolved since last review
Review effort: Lite
497af81 to
bae5da2
Compare
There was a problem hiding this comment.
However I think #4901 may be better as it doesn't incur any hack to the tebench.
There was a problem hiding this comment.
Agreed, #4901 should go in first. I've rebased this PR on top of it and dropped everything #4901 already covers: the VRAM device branch, the XPU helpers and the fill/verify branches. What's left is the part #4901 doesn't cover:
- With an empty
--xport_type, XPU buffers register with every enabled transport. The default allocation resolves to RDMA, which can register XPU memory only when the NIC accepts its dma-buf. Without this, XPU IPC and host staging aren't available to the engine. --seg_type_mixallocates XPU VRAM with the engine's default allocator instead of NVLink, as is already done for MLU.- The build-tree help test keeps the oneAPI runtime paths, so it passes in an icpx build.
If you see (1) as a hack in tebench, I can drop it and handle it in TENT's transport selection instead. Which do you prefer?
There was a problem hiding this comment.
It seems that (1) should be included in the logic of tent runtime. You can check this for ensuring minimized modification of code.
There was a problem hiding this comment.
Moved it into TransferEngineImpl::allocateLocalMemory: an XPU allocation with no transport specified now registers with all enabled transports. tebench no longer special-cases this. The --seg_type_mix change is now in #4901.
bae5da2 to
a28b47d
Compare
a28b47d to
c3fc82a
Compare
c3fc82a to
78a83cf
Compare
78a83cf to
d0f6a13
Compare
d0f6a13 to
668f67e
Compare
668f67e to
0956357
Compare
When the caller leaves the transport unspecified, allocateLocalMemory() picks one to allocate with and writes it back to options.type, so a registration with the same options uses only that transport. For XPU memory this is usually RDMA, which can register it only when the NIC accepts its dma-buf. Keep options.type unspecified for XPU locations so the buffer registers with every enabled transport and XPU IPC and host staging stay available. An explicit transport stays strict. Document XPU-to-XPU runs and transport selection in Section 3.5 of the tebench guide. Signed-off-by: XinyuYe-Intel <xinyu.ye@intel.com>
0956357 to
3c3f025
Compare



Description
Part of the Intel XPU support tracked in RFC #4031. Follows #4901, which added XPU device memory to tebench.
TransferEngineImpl::allocateLocalMemory()writes the transport it allocated with back tooptions.type, so registration with the same options uses only that transport. For XPU memory this is usually RDMA, which can register it only when the NIC accepts its dma-buf. For XPU locationsoptions.typenow staysUNSPEC, so the buffer registers with every enabled transport and XPU IPC and host staging stay available. An explicit transport stays strict.XpuEngineTest.DefaultAllocationRegistersEveryTransportcovers this.tebench.mdSection 3.5 adds an XPU-to-XPU example and describes transport selection.An Intel GPU CI runner is tracked in #4044.
Suggested Merge Priority
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:
tebench_xpu_data_test) and 5/5 in the CPU lane;tent_xpu_*_testandtent_local_memory_lifecycle_test5/5 on the OpenCL CPU device (the new test fails in all 8 modes without the runtime change)An earlier tebench-side version of this change passed on 2× Arc Pro B60 (one node, no RDMA device):
--check_consistencyfor all four DRAM/VRAM initiator/target pairs. The runtime version has not yet been run on hardware.Checklist
./scripts/code_format.shtebench_xpu_data_testtarget_link_librarieslines, left unchanged here)AI Assistance Disclosure
GitHub Copilot helped draft the code and docs and ran the builds and benchmarks. The submitter reviewed every changed line and is responsible for the change.