Skip to content

[XPU] Detect per-commit XPU tests dynamically in CI path filter - #41225

Closed
arathi-hlab wants to merge 2 commits into
sgl-project:mainfrom
arathi-hlab:xpu/dynamic-xpu-test-detect
Closed

arathi-hlab wants to merge 2 commits into
sgl-project:mainfrom
arathi-hlab:xpu/dynamic-xpu-test-detect

Conversation

@arathi-hlab

@arathi-hlab arathi-hlab commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

The main_package path filter in pr-test-xpu.yml relies on a hand-kept list of test/registered/ files. New register_xpu_ci tests that aren't added to it (e.g. test_ngram_corpus.py from #31362) don't trigger XPU CI when changed.

Split out of #41075 (part 2/2). Part 1 (disable test_ngram_corpus + extend the explicit list) is #41224. The two PRs are independent.

Modifications

  • check-changes now lists changed test/registered/**/*.py files (dorny/paths-filter with list-files: json).
  • New scripts/ci/xpu/detect_xpu_test_changes.py parses them with ci_register.ut_parse_one_file (the parser run_suite.py uses) and outputs true if any has a non-nightly register_xpu_ci. Unparseable files also return true so run_suite surfaces the error. Stdlib-only; runs on ubuntu-latest.
  • The result is OR-ed into main_package / changes_exist, so future XPU tests trigger XPU CI even if nobody updates the list.

Verification

Against the current tree, the script flags exactly the 42 files run_suite.py selects for stage-a-test-1-gpu-xpu,stage-b-test-1-gpu-xpu (39 enabled + 3 disabled), and nothing else. CUDA/AMD-only and nightly-only XPU files return false.


CI States

Latest PR Test (Base): ✅ Run #36145538875
Latest PR Test (Extra): ❌ Run #36145538144
Latest PR Test (AMD ROCm 10): ❌ Run #36145538730

@arathi-hlab

Copy link
Copy Markdown
Collaborator Author

Closing as duplicate of #41075, which has the identical diff and existing review history. Please continue review there.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant