Skip to content

[CI] Split baseline failure capture so it survives ninja exit#189

Merged
lamb-j merged 2 commits into
amd-stagingfrom
users/lambj/spirv-ci-baseline-capture-split
May 8, 2026
Merged

[CI] Split baseline failure capture so it survives ninja exit#189
lamb-j merged 2 commits into
amd-stagingfrom
users/lambj/spirv-ci-baseline-capture-split

Conversation

@lamb-j

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

Copy link
Copy Markdown
Collaborator

Summary

Follow-up fix to #188. The baseline check-amd-llvm-spirv step combined the lit invocation and the grep > spirv-fails-baseline.txt capture into a single shell script. Under bash -e + set -o pipefail (the GHA default), the non-zero ninja exit caused by lit failures aborts the script before the grep runs — so the baseline txt file is never produced and the github-script step falls through to the "baseline comparison unavailable" fallback.

Observed on PR #187's most recent run: baseline lit ran, produced 21 FAILs in the log, but the comment came back as "baseline comparison unavailable" instead of the expected "21 pre-existing on baseline" diff.

Fix: split the capture into its own step, matching the existing PR-head pattern (which works for the same reason — the grep is already separate there). The lit step itself still exits non-zero (continue-on-error: true keeps the run going), and the new capture step runs independently via if: always().

After this lands, re-running PR #187's workflow should produce the partition comment with all 21 failures in the ⚠️ pre-existing bucket.

The baseline lit step combined `ninja check-amd-llvm-spirv | tee` and
the `grep | sort > spirv-fails-baseline.txt` capture into a single
shell script. Under bash -e + `set -o pipefail`, the non-zero ninja
exit (any lit failure makes ninja return 1) aborted the script before
the grep ran. With no baseline txt produced, the comment script fell
through to the "baseline comparison unavailable" branch — see PR #187
where this was first observed.

Split the capture into its own step, mirroring the working PR-head
pattern. The lit step still exits non-zero on lit failures (it has
continue-on-error: true), but the capture step runs independently via
`if: always()` and writes the baseline file regardless.
lamb-j added a commit to ROCm/llvm-project that referenced this pull request May 8, 2026
Fixup to the previous commit. The baseline lit step combined ninja and
the grep capture into one shell script. Under bash -e + set -o pipefail,
the non-zero ninja exit (lit failures) aborted the script before the
grep ran, so build/spirv-fails-baseline.txt was never written and the
comment script fell through to "baseline comparison unavailable".

Split the capture into its own step, mirroring the working PR-head
pattern. Same fix applied in companion translator PR
ROCm/SPIRV-LLVM-Translator#189 (observed on
ROCm/SPIRV-LLVM-Translator#187 after #188 landed).
@github-actions

github-actions Bot commented May 8, 2026

Copy link
Copy Markdown
Contributor

⚠️ 21 pre-existing translator lit failures on baseline; not caused by this PR (see run).

🔴 New failures (0) — likely caused by this PR

(none)

🟢 Fixed by this PR (0) — failing on baseline, passing here

(none)

⚠️ Pre-existing on `amd-staging` (21)
FAIL: LLVM_SPIRV :: constant/local-float-point-constants.ll
FAIL: LLVM_SPIRV :: extensions/EXT/SPV_EXT_float8/conversions_matrix.ll
FAIL: LLVM_SPIRV :: extensions/EXT/SPV_EXT_float8/conversions_scalar_vector.ll
FAIL: LLVM_SPIRV :: extensions/EXT/SPV_EXT_shader_atomic_float_/atomicrmw_fsub_half.ll
FAIL: LLVM_SPIRV :: extensions/INTEL/SPV_INTEL_float4/conversions_packed.ll
FAIL: LLVM_SPIRV :: extensions/INTEL/SPV_INTEL_float4/conversions_scalar_vector.ll
FAIL: LLVM_SPIRV :: extensions/INTEL/SPV_INTEL_fp_conversions/spv_intel_fp_conversions.ll
FAIL: LLVM_SPIRV :: extensions/INTEL/SPV_INTEL_int4/conversions_packed.ll
FAIL: LLVM_SPIRV :: extensions/INTEL/SPV_INTEL_sigmoid/sigmoid_f16.ll
FAIL: LLVM_SPIRV :: extensions/KHR/SPV_KHR_bfloat16/cooperative_matrix_bfloat16.ll
FAIL: LLVM_SPIRV :: extensions/KHR/SPV_KHR_cooperative_matrix/conversion_instructions.ll
FAIL: LLVM_SPIRV :: extensions/KHR/SPV_KHR_subgroup_rotate/SPV_KHR_subgroup_rotate.cl
FAIL: LLVM_SPIRV :: extensions/KHR/SPV_KHR_uniform_group_instructions/group-instructions.ll
FAIL: LLVM_SPIRV :: transcoding/float16.ll
FAIL: LLVM_SPIRV :: transcoding/image_signedness_spv_ir.ll
FAIL: LLVM_SPIRV :: transcoding/OpImageSampleExplicitLod_arg.cl
FAIL: LLVM_SPIRV :: transcoding/spec_const.ll
FAIL: LLVM_SPIRV :: transcoding/sub_group_clustered_reduce.ll
FAIL: LLVM_SPIRV :: transcoding/sub_group_non_uniform_arithmetic.ll
FAIL: LLVM_SPIRV :: transcoding/sub_group_shuffle.ll
FAIL: LLVM_SPIRV :: transcoding/sub_group_shuffle_relative.ll

The amd-staging-psdb ruleset requires context
"SPIRV CI - amd-staging / Build & Test". When a workflow has multiple
on: triggers (pull_request + workflow_dispatch), GitHub disambiguates
the emitted check context with a trailing event suffix — actual context
becomes "SPIRV CI - amd-staging / Build & Test (pull_request)", which
the rule never matches. Result: required check stays "Pending — Required"
forever, blocks non-admin merges.

Drop workflow_dispatch (we never used it in practice — pull_request's
synchronize/reopened types already cover any retrigger we'd want via the
PR UI).
lamb-j added a commit to ROCm/llvm-project that referenced this pull request May 8, 2026
When a workflow has multiple on: triggers (pull_request + workflow_dispatch),
GitHub disambiguates the emitted check context with a trailing event suffix
— actual context becomes "SPIRV CI - amd-staging / Build & Test
(pull_request)" instead of the bare "SPIRV CI - amd-staging / Build & Test"
the required-check rule expects. Required check stays "Pending — Required"
forever and blocks non-admin merges on amd-staging.

Drop workflow_dispatch — never used in practice, pull_request's
synchronize/reopened types already cover the retriggers we'd want.

Same fix in companion translator PR ROCm/SPIRV-LLVM-Translator#189.
@lamb-j lamb-j merged commit a2e64e8 into amd-staging May 8, 2026
1 check passed
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