Skip to content

[CI/Build] Add maintainer-authorized XPU hardware core (Stage 2) - #5090

Merged
Aionw merged 6 commits into
kvcache-ai:mainfrom
VincyZhang:stage-2
Nov 27, 2026
Merged

Aionw merged 6 commits into
kvcache-ai:mainfrom
VincyZhang:stage-2

Conversation

@VincyZhang

@VincyZhang VincyZhang commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Description

Implement Stage 2 of the Intel XPU CI RFC #5036: maintainer-authorized, exact-revision hardware validation on two Intel Arc Pro B60 GPUs.

Stage 1 is merged: #5078 is included in upstream main at d6a738dc. The PR now contains only Stage 2 changes.

Stage 2

  • Add the hosted XPU build and runs-on: xpu hardware job to the existing E2E CI controller and shared E2E Gate, using run-e2e-ci or workflow_dispatch.
  • Enable XPU validation on two-cards B60 GPUs.
  • Pass the producing attempt explicitly so partial reruns do not incorrectly validate against the consumer's attempt.

Suggested Merge Priority

  • P0
  • P1
  • P2 - Normal: implement the confirmed Stage 2 CI use case.
  • P3

Module

  • Transfer Engine (mooncake-transfer-engine) - CI coverage only
  • Mooncake Store (mooncake-store) - CI coverage only
  • Mooncake EP (mooncake-ep) - CI coverage only
  • Python Wheel (mooncake-wheel) - packaging validation
  • CI/CD
  • Docs

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation update
  • Breaking change

How Has This Been Tested?

Current Branch: fe71fab4

Executed locally on the current branch:

python -m unittest discover -s scripts/ci/tests -p test_xpu_ci.py
python -m unittest discover -s scripts/ci/tests -p test_run_ctest.py
pre-commit run --files $(git diff --name-only --diff-filter=ACMR upstream/main...HEAD)
git diff --check upstream/main...HEAD
  • All 44 XPU packaging and orchestration regression tests pass, including partial-rerun artifact identity and unset/empty/existing library-path cases.
  • All 5 shared CTest/report-validation regressions pass: 49 local regressions in total.
  • PR-scoped pre-commit hooks pass, including YAML, merge-conflict, Ruff, formatting, and spelling checks. No C/C++ source changes are included.
  • These are CPU-only packaging and orchestration checks; they do not establish current-head B60 hardware correctness. No new actionlint or hardware run was performed for this update.

Historical real hardware evidence

Successful fork validation run: https://github.com/VincyZhang/Mooncake/actions/runs/44089796933/job/134071687222

Test results:

  • Current-branch unit and orchestration regression tests pass
  • Current-branch PR-scoped pre-commit hooks pass
  • Historical fork hardware validation passed, limited to the revision and coverage above
  • Current-head hardware validation and trusted-main end-to-end rollout completed

Checklist

  • The single contribution commit includes a matching Signed-off-by trailer
  • Human submitter has reviewed every changed line and can defend the changes
  • Agent self-review completed; changes kept scoped to Stage 2
  • PR-scoped pre-commit hooks pass
  • Related runner and workflow documentation updated
  • Regression coverage added and synchronized with upstream test inventory
  • RFC for the larger change: [RFC]: Intel XPU CI Coverage and Resource Allocation Proposal #5036

AI Assistance Disclosure

  • No AI tools were used
  • AI tools were used

Copilot assisted with implementation, CI failure diagnosis, exact-artifact reproductions, regression coverage, workflow validation, upstream conflict resolution, commit-history cleanup and PR preparation. The human submitter remains responsible for review and the final design.

Integrate fixed-pair XPU hardware validation into the shared E2E workflow with authorized execution, verified artifact handoff, isolated networking, and shared test-report checks.

Build on the merged Stage 1 implementation and include the latest concurrent-copy and peer-exit IPC tests in the required hardware inventory.

Signed-off-by: VincyZhang <wenxin.zhang@intel.com>
Pass the producing build attempt through the artifact handoff instead of validating against the consumer attempt. Keep strict artifact and provenance checks, and cover partial reruns and mismatched attempts in regressions.

Signed-off-by: VincyZhang <wenxin.zhang@intel.com>
Remove custom XPU authorization and check publication, using GitHub revision context and the existing E2E gate. Restore shared CTest and TENT behavior and update XPU tests and documentation while preserving artifact verification and partial-rerun support.

Signed-off-by: VincyZhang <wenxin.zhang@intel.com>
@VincyZhang
VincyZhang marked this pull request as ready for review November 12, 2026 09:46
Copilot AI balanced review requested due to automatic review settings November 12, 2026 09: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.

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

4 open issues
What changed in this PR

Adds Stage 2 Intel XPU hardware validation to the shared E2E CI controller, including exact-artifact handoff, runner/GPU affinity contract, and strict report/inventory verification.

Changes:

  • Introduces a unified verify_xpu_ci.py tool that validates wheel integrity, artifact provenance/hashes, seccomp profile generation, and hardware-suite execution.
  • Adds an XPU core hardware workflow (integration-test-xpu.yml) and wires it into the shared e2e-ci.yml gate via run-e2e-ci label / workflow dispatch.
  • Adds/updates CPU-only regression tests and runner documentation for XPU CI Stage 2.
File Description
scripts/​xpu/​XPU_CI.md Documents XPU runner isolation, affinity mask contract, triggers, required coverage, and diagnostics.
scripts/​e2e/​python/​verify_xpu_wheel.py Removes the older host-only wheel checker in favor of the unified verifier.
scripts/​e2e/​python/​verify_xpu_ci.py New unified verifier for wheel checks, artifact validation, seccomp prep, and hardware suite orchestration.
scripts/​ci/​tests/​test_xpu_ci.py Expands regression tests to cover new verifier behaviors and workflow contracts.
.pre-commit-config.yaml Updates codespell ignore list for XPU/runner terminology.
.github/​workflows/​integration-test-xpu.yml New hardware workflow: downloads exact artifacts, runs isolated containerized XPU core suites, uploads diagnostics.
.github/​workflows/​e2e-ci.yml Integrates XPU build+hardware jobs into shared E2E CI and gate.
.github/​workflows/​ci_xpu.yml Exposes artifact attempt, switches to unified verifier for host checks, packages python deps into native bundle.

Review effort: Lite

Comment thread scripts/e2e/python/verify_xpu_ci.py Resolved
Comment thread scripts/e2e/python/verify_xpu_ci.py Resolved
Signed-off-by: VincyZhang <wenxin.zhang@intel.com>
@Aionw

Aionw commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

Could we extract the substantial host-side shell logic from integration-test-xpu.yml into a script under scripts/xpu/ (for example, run_core.sh with run and cleanup subcommands)? In particular, the GPU preflight, Docker invocation, exit traps, and cleanup/recheck logic would be easier to review as a standalone script, without generating cleanup.sh via a heredoc.

The workflow could retain the orchestration: permissions, checkouts, environment/input wiring, step ordering, the independent if: always() cleanup step, and diagnostic artifact upload. Short setup commands such as allocating the run directory can stay inline; this does not need to eliminate all inline shell or add more responsibilities to verify_xpu_ci.py.

This would also help the regression tests: test_xpu_ci.py currently extracts shell fragments from the YAML using markers such as script.index("container_id=$(docker create") and script.index("# Preserve host GPU ordinals"). Testing script entry points with mocked commands would make those tests less dependent on comments and source layout.

One important constraint: invoke the extracted script from xpu-control, checked out at ${{ github.workflow_sha }}, not from xpu-tested-source, so the trusted-harness boundary remains unchanged. Ideally this would be a behavior-preserving extraction, retaining both the exit-trap cleanup and the separate always-run cleanup recheck.

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.

Comment thread .github/workflows/e2e-ci.yml Resolved
Comment thread scripts/e2e/python/verify_xpu_ci.py Resolved
Move host preflight, Docker execution, exit traps and cleanup rechecks into the trusted run_core.sh entry points, with mocked-command lifecycle regressions.

Restrict compiler-cache credential setup to push/schedule builds without an external revision. Correct IPC parameterized identities and document the 152-case native inventory.

Signed-off-by: VincyZhang <wenxin.zhang@intel.com>
@VincyZhang

Copy link
Copy Markdown
Contributor Author

Could we extract the substantial host-side shell logic from integration-test-xpu.yml into a script under scripts/xpu/ (for example, run_core.sh with run and cleanup subcommands)? In particular, the GPU preflight, Docker invocation, exit traps, and cleanup/recheck logic would be easier to review as a standalone script, without generating cleanup.sh via a heredoc.

The workflow could retain the orchestration: permissions, checkouts, environment/input wiring, step ordering, the independent if: always() cleanup step, and diagnostic artifact upload. Short setup commands such as allocating the run directory can stay inline; this does not need to eliminate all inline shell or add more responsibilities to verify_xpu_ci.py.

This would also help the regression tests: test_xpu_ci.py currently extracts shell fragments from the YAML using markers such as script.index("container_id=$(docker create") and script.index("# Preserve host GPU ordinals"). Testing script entry points with mocked commands would make those tests less dependent on comments and source layout.

One important constraint: invoke the extracted script from xpu-control, checked out at ${{ github.workflow_sha }}, not from xpu-tested-source, so the trusted-harness boundary remains unchanged. Ideally this would be a behavior-preserving extraction, retaining both the exit-trap cleanup and the separate always-run cleanup recheck.

Thanks for the suggestion!
Extracted the host-side logic into scripts/xpu/run_core.sh with run and cleanup subcommands, preserving execution from the trusted xpu-control checkout, exit-trap cleanup, and the independent always() recheck; the regression tests now exercise these entry points with mocked commands.
Could please please add run-e2e-ci label to trigger the e2e-test with xpu-integration-test? @Aionw

@Aionw

Aionw commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator

Thanks for your update. I've added e2e label.

Signed-off-by: VincyZhang <wenxin.zhang@intel.com>
@VincyZhang

Copy link
Copy Markdown
Contributor Author

Thanks for your update. I've added e2e label.

The run-e2e-ci label triggered E2E CI, but pull_request_target uses the workflow from main, which does not yet include the XPU jobs added in this PR. It's not working in main repo.
So I added the same xpu runner into my forked repo and manually trigger there. The wheel build and integration both passed. @Aionw Would you please take a look? https://github.com/VincyZhang/Mooncake/actions/runs/44089796933/job/134071687222

@VincyZhang

Copy link
Copy Markdown
Contributor Author

@Aionw This PR is ready for a while and is only to add XPU test suites, all checks passed. Is that OK to get it merged now?

@Aionw
Aionw merged commit aa9716a into kvcache-ai:main Nov 27, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants