[CI] Add SPIRV-focused PR CI workflow for amd-staging#2451
Merged
Conversation
Collaborator
Collaborator
Collaborator
Collaborator
Collaborator
60bf929 to
1af37c8
Compare
6a3d4f5 to
8baf594
Compare
Mirrors the SPIRV CI structure on ROCm/SPIRV-LLVM-Translator
amd-staging: a top-level dispatcher (spirv-ci.yml) that calls per-
platform reusable workflows (spirv-ci-linux.yml, spirv-ci-windows.yml).
Each platform builds LLVM/Clang/LLD + amd-llvm-spirv translator +
device-libs + Comgr in one job, uploads the build trees as a single
artifact, and fans out to parallel test jobs that consume it:
Linux::release / Build (required)
Linux::release / Test SPIRV translator lit
Linux::release / Test LLVM SPIRV codegen
Linux::release / Test Comgr
Windows::release / Build
Windows::release / Test SPIRV translator lit
Windows::release / Test LLVM SPIRV codegen
Windows::release / Test Comgr
The translator-lit test job re-runs lit twice (PR head + amd-staging
baseline) and gates on new-failures-only — Khronos upstream breaks
~1 translator lit test per week, so without baseline-diffing the
suite would block unrelated PRs on those days. Pre-existing baseline
failures don't gate.
Goal: catch breakage in compiler / SPIRV translator that would fail
downstream Comgr / HIP testing without paying the cost of a full
TheRock build. Test categories will grow over time (rocm-examples,
HIP-tests SPIRV mode, etc.) — they slot in as new jobs in the
per-platform workflows.
This is the llvm-project mirror of the workflows on
ROCm/SPIRV-LLVM-Translator amd-staging. Two intentional divergences
from the translator copy:
1. No sticky PR comment on the translator-lit test job. The
translator copy posts a per-PR comment partitioning translator-
lit failures into new / fixed / pre-existing. On llvm-project
PRs (which mostly touch llvm/clang/lld, not the SPIRV translator)
that comment would just be noise. The failing-check signal in
the PR header is enough; the gate step still fails the job on
real regressions and prints the failing test list to the log.
pull-requests: write permission dropped accordingly.
2. No rocm-examples test job (yet). That work is under review on
the translator side first (ROCm/SPIRV-LLVM-Translator#208); it
will be brought over here once stable.
Replaces 13 incremental prototype commits with a single squash so the
diff matches the current intended state. The translator side is the
source of truth for these workflows going forward; bumps from there
will be replicated here.
The "Checkout SPIRV-LLVM-Translator" steps had no repository/ref set, so on llvm-project (where this workflow now lives) they defaulted to the workflow's own repo and checked out llvm-project content into the translator's path. Build then failed with "ninja: error: unknown target 'amd-llvm-spirv'" because LLVM's projects/ CMake didn't find a real translator there. Qualify all 8 occurrences (build + 3 test jobs across Linux + Windows) to pull ROCm/SPIRV-LLVM-Translator @ amd-staging. llvm-project PRs don't change the translator, so amd-staging tip is the right ref. Step name updated from "(PR head)" to "(amd-staging)" to reflect the new semantics.
Two coupled fixes for the llvm-project copy of the workflow:
1. Build job was checking out llvm-project at amd-staging tip
(leftover from the translator-copy semantics) so PR content was
never being tested. Changed all llvm-project checkouts in Build +
3 test jobs (per platform) to pull the PR head SHA from the head
repo. Uses github.event.pull_request.head.{sha,repo.full_name}
with workflow_dispatch fallbacks to github.{sha,repository}.
Removes the now-unneeded Build job output llvm_project_sha and
the Resolve LLVM SHA step — github.event.pull_request.head.sha is
stable for the whole workflow run, so test jobs can use it
directly.
2. translator-lit baseline-diff was swapping the translator to
amd-staging tip for the baseline run. That made sense on the
translator side (PRs change the translator); on llvm-project,
PRs change llvm/clang/lld so the swap target is llvm-project.
Baseline run now: cd llvm-project + git fetch+checkout amd-staging
from explicit upstream URL (origin may be a fork on PR runs),
then reconfigure + incremental rebuild of changed LLVM libs
+ relink translator + rerun lit. Diff isolates failures
introduced by this PR's llvm changes.
The baseline rebuild cost scales with how many LLVM libs the PR
touches; small PRs incur minutes, broad refactors more.
8baf594 to
fcc97ac
Compare
lamb-j
commented
May 27, 2026
Per CI team convention, workflow files and names targeting a specific branch should carry that branch in the filename and the workflow name. - Rename spirv-ci-windows.yml -> spirv-ci-windows-amd-staging.yml - Update workflow names: - SPIRV Compiler CI -> SPIRV Compiler CI - amd-staging - SPIRV Compiler CI - Windows -> SPIRV Compiler CI - Windows - amd-staging - Update dispatcher 'uses:' paths to the renamed Linux/Windows files
Missed in prior commit: - name: SPIRV Compiler CI - Windows -> SPIRV Compiler CI - Windows - amd-staging - Header comment now references spirv-ci-linux-amd-staging.yml
skganesan008
approved these changes
May 27, 2026
Collaborator
Author
|
SPIRV CI fully green, merged |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds SPIRV-focused PR CI for
ROCm/llvm-projectamd-staging, mirroring the structure that landed onROCm/SPIRV-LLVM-Translatoramd-staging. Each platform builds LLVM/Clang/translator/Comgr in one job and fans out to parallel test jobs that consume a GHA-artifact build tree. Catches translator/Comgr breakage without paying the cost of a full TheRock build.New checks on PRs
All checks are informational initially; promote individually to required as each stabilizes.
Differences from the translator copy
Two intentional divergences from the workflows on ROCm/SPIRV-LLVM-Translator
amd-staging:No sticky PR comment from the translator-lit test job. The translator copy posts a per-PR comment partitioning translator-lit failures into new / fixed / pre-existing. On llvm-project PRs (which mostly touch llvm/clang/lld, not the SPIRV translator) that comment would just be noise — the failing check in the PR header is enough signal. The gate step still fails the job on real regressions and prints the failing test list to the log.
pull-requests: writepermission dropped accordingly.No
rocm-examplestest job (yet). That work is under review on the translator side first as [CI] Add rocm-examples test (in-pipeline HIP runtime, CMake + bash hybrid) SPIRV-LLVM-Translator#208 and will be brought over here once stable.