Skip to content

[TENT] Register unspecified XPU allocations with all enabled transports - #4881

Open
XinyuYe-Intel wants to merge 1 commit into
kvcache-ai:mainfrom
XinyuYe-Intel:feat/xpu-tebench
Open

XinyuYe-Intel wants to merge 1 commit into
kvcache-ai:mainfrom
XinyuYe-Intel:feat/xpu-tebench

Conversation

@XinyuYe-Intel

@XinyuYe-Intel XinyuYe-Intel commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Description

Part of the Intel XPU support tracked in RFC #4031. Follows #4901, which added XPU device memory to tebench.

  • When the caller leaves the transport unspecified, TransferEngineImpl::allocateLocalMemory() writes the transport it allocated with back to options.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 locations options.type now stays UNSPEC, so the buffer registers with every enabled transport and XPU IPC and host staging stay available. An explicit transport stays strict. XpuEngineTest.DefaultAllocationRegistersEveryTransport covers this.
  • The tebench build-tree help test fix originally in this PR landed separately in [Build][Test] Fix icpx (USE_XPU) build and test portability #5154; this PR is rebased on top of it.
  • tebench.md Section 3.5 adds an XPU-to-XPU example and describes transport selection.

An Intel GPU CI runner is tracked in #4044.

Suggested Merge Priority

  • P0 — Urgent: Critical security vulnerability, data loss/corruption, or widespread production outage requiring immediate action
  • P1 — High: Significant correctness or stability issue in existing functionality, or a regression blocking users without a practical workaround
  • P2 — Normal: Routine bug fix, validated performance/compatibility improvement, or new feature for a confirmed use case
  • P3 — Low: Experimental feature, optional enhancement, refactoring, or cleanup with no urgent user impact

Module

  • Transfer Engine (mooncake-transfer-engine)
  • Mooncake Store (mooncake-store)
  • Mooncake Conductor (mooncake-conductor)
  • Reshard (mooncake-reshard)
  • Mooncake EP (mooncake-ep)
  • Mooncake PG (mooncake-pg)
  • Integration (mooncake-integration)
  • P2P Store (mooncake-p2p-store)
  • Python Wheel (mooncake-wheel)
  • Common (mooncake-common)
  • Mooncake RL (mooncake-rl)
  • CI/CD
  • Docs
  • Other

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Breaking change
  • Documentation update
  • Performance improvement
  • Other

How Has This Been Tested?

Test commands:

# XPU lane (oneAPI, icpx/icx, -DUSE_XPU=ON) and CPU lane (-DUSE_XPU=OFF)
cmake -G Ninja -S . -B build -DUSE_TENT=ON -DUSE_HTTP=ON \
  -DBUILD_UNIT_TESTS=ON -DBUILD_BENCHMARK=ON [-DUSE_XPU=ON]
cmake --build build --target mooncake-transfer-engine/benchmark/all
ctest --test-dir build/mooncake-transfer-engine/benchmark --output-on-failure

Test results:

  • Unit tests pass: benchmark ctest 6/6 in the XPU lane (including tebench_xpu_data_test) and 5/5 in the CPU lane; tent_xpu_*_test and tent_local_memory_lifecycle_test 5/5 on the OpenCL CPU device (the new test fails in all 8 modes without the runtime change)
  • Integration tests pass (if applicable)
  • Manual testing done (describe below)

An earlier tebench-side version of this change passed on 2× Arc Pro B60 (one node, no RDMA device): --check_consistency for all four DRAM/VRAM initiator/target pairs. The runtime version has not yet been run on hardware.

Checklist

  • I have performed a self-review of my own code
  • I have formatted my code using ./scripts/code_format.sh
  • I have run pre-commit on the files changed in this PR and all hooks pass (cmake-format only flags the existing tebench_xpu_data_test target_link_libraries lines, left unchanged here)
  • I have updated the documentation (if applicable)
  • I have added tests to prove my changes are effective
  • For changes >500 LOC: I have filed an RFC issue

AI Assistance Disclosure

  • No AI tools were used
  • AI tools were used (specify below)

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.

Copilot AI balanced review requested due to automatic review settings October 23, 2026 06:11
@github-actions github-actions Bot added documentation Improvements or additions to documentation run-ci Transfer Engine labels Oct 23, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

Comment thread scripts/tebench/record_baseline.sh Resolved
@XinyuYe-Intel XinyuYe-Intel changed the title [TENT][Benchmark] Add Intel XPU support to tebench with a B60 baseline [TENT][Benchmark] Add Intel XPU support to tebench Oct 23, 2026
@XinyuYe-Intel
XinyuYe-Intel requested a balanced review from Copilot October 23, 2026 08:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However I think #4901 may be better as it doesn't incur any hack to the tebench.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. 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.
  2. --seg_type_mix allocates XPU VRAM with the engine's default allocator instead of NVLink, as is already done for MLU.
  3. 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?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that (1) should be included in the logic of tent runtime. You can check this for ensuring minimized modification of code.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@XinyuYe-Intel XinyuYe-Intel changed the title [TENT][Benchmark] Add Intel XPU support to tebench [TENT][Benchmark] Route XPU tebench buffers through all enabled transports Oct 27, 2026
@github-actions github-actions Bot added the size/M 100-1000 changed lines (additions + deletions) label Oct 27, 2026
@XinyuYe-Intel XinyuYe-Intel changed the title [TENT][Benchmark] Route XPU tebench buffers through all enabled transports [TENT] Register unspecified XPU allocations with all enabled transports Oct 27, 2026
@github-actions github-actions Bot added size/S 0-99 changed lines (additions + deletions) and removed size/M 100-1000 changed lines (additions + deletions) labels Oct 28, 2026
@VincyZhang VincyZhang mentioned this pull request Oct 29, 2026
14 of 36 tasks
@XinyuYe-Intel

Copy link
Copy Markdown
Contributor Author

Hi @alogfans, I've moved the change into the TENT runtime as you suggested and rebased onto main now that #4901 is merged. Would you mind taking another look when you have time? Thanks!

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>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation run-ci size/S 0-99 changed lines (additions + deletions) Transfer Engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants