Skip to content

[CI] Add SPIRV-focused PR CI workflow for amd-staging#2451

Merged
lamb-j merged 7 commits into
amd-stagingfrom
users/lambj/spirv-ci-prototype
May 27, 2026
Merged

[CI] Add SPIRV-focused PR CI workflow for amd-staging#2451
lamb-j merged 7 commits into
amd-stagingfrom
users/lambj/spirv-ci-prototype

Conversation

@lamb-j

@lamb-j lamb-j commented May 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds SPIRV-focused PR CI for ROCm/llvm-project amd-staging, mirroring the structure that landed on ROCm/SPIRV-LLVM-Translator amd-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

SPIRV Compiler CI - amd-staging / Linux::release / Build
SPIRV Compiler CI - amd-staging / Linux::release / Test SPIRV translator lit
SPIRV Compiler CI - amd-staging / Linux::release / Test LLVM SPIRV codegen
SPIRV Compiler CI - amd-staging / Linux::release / Test Comgr
SPIRV Compiler CI - amd-staging / Windows::release / Build
SPIRV Compiler CI - amd-staging / Windows::release / Test SPIRV translator lit
SPIRV Compiler CI - amd-staging / Windows::release / Test LLVM SPIRV codegen
SPIRV Compiler CI - amd-staging / Windows::release / Test Comgr

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:

  1. 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: write permission dropped accordingly.

  2. No rocm-examples test 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.

@z1-cciauto

Copy link
Copy Markdown
Collaborator

@z1-cciauto

Copy link
Copy Markdown
Collaborator

@z1-cciauto

Copy link
Copy Markdown
Collaborator

@z1-cciauto

Copy link
Copy Markdown
Collaborator

@z1-cciauto

Copy link
Copy Markdown
Collaborator

@lamb-j lamb-j force-pushed the users/lambj/spirv-ci-prototype branch from 60bf929 to 1af37c8 Compare May 18, 2026 23:16
@lamb-j lamb-j changed the title [CI] Prototype SPIRV-focused CI workflow [CI] Add SPIRV-focused PR CI workflow for amd-staging May 18, 2026
@lamb-j lamb-j force-pushed the users/lambj/spirv-ci-prototype branch from 6a3d4f5 to 8baf594 Compare May 20, 2026 18:51
@lamb-j lamb-j requested a review from kirthana14m May 21, 2026 20:34
@ROCm ROCm deleted a comment from github-actions Bot May 21, 2026
lamb-j added 3 commits May 21, 2026 13:36
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.
@lamb-j lamb-j force-pushed the users/lambj/spirv-ci-prototype branch from 8baf594 to fcc97ac Compare May 21, 2026 20:36
@lamb-j lamb-j requested a review from skganesan008 May 26, 2026 18:22
Comment thread .github/workflows/spirv-ci-linux-amd-staging.yml Outdated
lamb-j added 3 commits May 27, 2026 10:42
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
@lamb-j lamb-j merged commit 5c0ff67 into amd-staging May 27, 2026
30 checks passed
@lamb-j lamb-j deleted the users/lambj/spirv-ci-prototype branch May 27, 2026 19:41
@lamb-j

lamb-j commented May 27, 2026

Copy link
Copy Markdown
Collaborator Author

SPIRV CI fully green, merged

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.

3 participants