Repository navigation
[CI/Build] Enable hosted XPU CI Stage 1 - #5078
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The hosted CPU-only XPU build and packaging changes have no active review issues.
No open issues 🎉
What changed in this PR
Implements the hosted, CPU-only build and packaging stage of RFC #5036, adding XPU validation alongside existing CI. GPU execution and package publication remain out of scope.
Changes:
- Adds a reusable XPU wheel builder with path-selected PR/main CI, nightly version stamping, and required gates.
- Validates 30 host-side C++ cases and clean wheel installation, then packages native tests with inventories, hashes, and provenance for later hardware testing.
- Adds XPU packaging support, native capability flags, a SYCL compilation guard, and CPU-only regression tests.
| File | Description |
|---|---|
scripts/e2e/python/verify_xpu_wheel.py |
Checks installed wheel integrity, native capabilities, Store selection, and master startup. |
scripts/ci/tests/test_xpu_ci.py |
Adds regression coverage for gates, reports, cleanup, wheel checks, and native packaging. |
scripts/build_wheel.sh |
Adds the XPU distribution variant and an explicit build-directory preservation option. |
python/mooncake/engine.pyi |
Declares XPU and TENT capability flags. |
mooncake-wheel/pyproject.toml |
Updates the metadata-maintenance comment to include ROCm and XPU variants. |
mooncake-store/include/crc32c.h |
Excludes x86 CRC32C intrinsics from SYCL device compilation. |
mooncake-integration/transfer_engine/transfer_engine_py.cpp |
Exposes native XPU and TENT capability flags. |
.gitignore |
Ignores XPU CI build and output directories. |
.github/workflows/nightly.yml |
Adds the version-stamped XPU build to the nightly gate without publication. |
.github/workflows/ci.yml |
Adds XPU path selection, reusable workflow invocation, and strict result gating. |
.github/workflows/ci_xpu.yml |
Defines hosted XPU builds, host tests, wheel validation, and artifact packaging. |
Review effort: Balanced
Add a reusable CPU-only XPU builder, dedicated wheel identity, strict host test and clean installation checks, and SHA-bound native test artifacts. Wire PR/main and nightly gates without enabling hardware jobs or publication. Keep x86 CRC32C feature detection out of the SYCL device pass and document the three-stage rollout from RFC kvcache-ai#5036. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: VincyZhang <wenxin.zhang@intel.com>
Aionw
left a comment
There was a problem hiding this comment.
Thanks for splitting this out as Stage 1. The hosted builder looks sound, and CI is green (build-wheel-xpu at ~18.5 min, off the critical path). I checked the __SYCL_DEVICE_ONLY__ guard in crc32c.h, the FREE_BUILD_DIR=0 semantics (defaults unchanged for other callers), and the auditwheel excludes for the SYCL/Level Zero runtimes. All three look fine.
My main concerns are maintainability. The path selection duplicates src, the host-test counts are hardcoded, and the regression tests are tightly coupled to the text of the scripts they test. Details are inline.
Allow FREE_BUILD_DIR=0 to override automatic CI build-tree cleanup and use it in the XPU wheel step. Keep shared dependencies available to auditwheel and native binaries available to the following artifact step. Add regression coverage for CI and local cleanup defaults. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: VincyZhang <wenxin.zhang@intel.com> (cherry picked from commit 629cf3e)
Reuse the shared source selector and CI gate, enable compiler caching with memory-aware parallelism, and remove fixed host-test counts. Make cleanup directly testable and improve diagnostic uploads and dependency reproducibility. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: VincyZhang <wenxin.zhang@intel.com>
Signed-off-by: VincyZhang <wenxin.zhang@intel.com>
Resolve the CRC32C SYCL guard conflict using the upstream implementation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: VincyZhang <wenxin.zhang@intel.com>
Signed-off-by: VincyZhang <wenxin.zhang@intel.com> # Conflicts: # scripts/build_wheel.sh
Signed-off-by: VincyZhang <wenxin.zhang@intel.com>
45326bd to
e81080a
Compare
Description
Implement Stage 1 (hosted build and packaging) of RFC #5036:
#5036
mooncake-transfer-engine-xpudistribution using the existing wheel builder. The Python import remainsmooncake.pybind_client_test, dependency/test inventories, hashes and source/toolchain provenance for a later hardware consumer. Only enumerate their tests; do not execute GPU test bodies.FREE_BUILD_DIR=0, so auditwheel can resolvelibtent_metrics.soand the later native-artifact step still has its inputs. Keep existing cleanup defaults for other callers.Scope: This is host-only, artifact-only validation. It does not add XPU hardware runners, GPU execution, RDMA/GDS/multi-node coverage, vLLM E2E, release-workflow integration, or PyPI/TestPyPI publication. Hardware core coverage and expanded nightly/release readiness remain Stages 2 and 3 of the RFC.
Related work: The fork-only validation PR VincyZhang#1 temporarily disables unrelated CI to exercise the same XPU builder. This upstream PR retains normal Linux/macOS CI and does not include that isolation change. Existing XPU runtime/transport PRs, including #3935 and #4881, cover runtime functionality rather than this hosted packaging pipeline.
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:
python -m unittest discover -s scripts/ci/tests -v bash -n scripts/build_wheel.sh go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.11 -shellcheck= \ .github/workflows/ci.yml .github/workflows/ci_xpu.yml .github/workflows/nightly.yml pre-commit run --files $(git diff --name-only --diff-filter=ACMR upstream/main...HEAD) git diff upstream/main...HEAD --checkTest results:
Hosted end-to-end validation of the identical reusable XPU workflow, wheel builder, wheel verifier and XPU regression-test implementation passed in the fork:
https://github.com/VincyZhang/Mooncake/actions/runs/40897415848
That run built and repaired the wheel, passed all 30 host cases and the clean-install smoke check, packaged native tests and uploaded artifacts. Downloaded wheel/archive SHA256 checks and all 60 native-bundle file checks passed. Its source is fork PR merge commit
4a2b58670be1fe5278a15eaf538bff7a45b70306, which contains fix629cf3ecc88c6245ee4724da60764e173f8c0bb2; it is not a hosted run of this upstream PR's exact SHA. Normal CI/nightly wiring is covered locally; upstream PR checks are pending.Pre-commit, actionlint, Bash syntax and diff-whitespace checks pass. The C++ formatting hook passed on PR-changed line ranges. A non-mutating merge check against current upstream main also passed.
Checklist
./scripts/code_format.sh(via the repository's pre-commit C++ formatting hook)Draft pending human submitter review of every changed line. The self-review checkbox is intentionally left unchecked; automated review does not substitute for the required human review. Rollout scope and limitations are recorded above and in the RFC; no new standalone XPU README is included.
AI Assistance Disclosure
Copilot assisted with implementation, debugging, test execution and PR preparation. The human submitter remains responsible for reviewing, understanding and defending all changes.