Skip to content

test(rocke): qualify rocKE LLVM 24 lane - #14692

Merged
shumway merged 4 commits into
developfrom
users/shumway/aick-2742-llvm24-artifacts
Oct 31, 2026
Merged

shumway merged 4 commits into
developfrom
users/shumway/aick-2742-llvm24-artifacts

Conversation

@shumway

@shumway shumway commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add the measured LLVM 24 intrinsic arch-domain column and remove the temporary LLVM24-to-LLVM23 fallback
  • model LLVM 24’s named-barrier ABI change in both lowering engines, using addrspace(15) declarations and calls
  • add distinct LLVM 24 representative and differential golden coverage
  • derive flavor-matrix tests from the central supported flavor set
  • update LLVM flavor and qualification documentation

Qualification found that LLVM 24 retains LLVM 23’s datalayout and target-operation surface, but changes the four named-barrier pointer declarations from addrspace(3) to addrspace(15). The Python and C++ engines insert matching address-space casts and remain byte-identical.

Existing LLVM 20, LLVM 22, and LLVM 23 golden sections are unchanged.

ISSUE ID : AICK-2742

Test plan

  • LLVM 24 emitted-IR strict validity: 333/333 modules compiled and linked
  • byte-identity gates at LLVM 20, LLVM 22, LLVM 23, and LLVM 24
  • python -m pytest platform/tests -q — 4638 passed, 1800 skipped
  • LLVM 24 CTest suite — 33/33 passed
  • LLVM 24 arch-domain reproducibility CTest passes without skipping
  • representative and differential LLVM 24 golden checks
  • relative-path guard
  • pre-commit hooks over all changed files

Follow-up

The C++ declaration tables remain flattened to preserve the existing resolver structure. Composing declaration deltas instead of duplicating inherited entries is tracked separately in AICK-2857.

@therock-pr-bot

therock-pr-bot Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

✅ All Checks Passed — Ready for Review

Check Status Details
📝 PR Description ✅ Pass —
⛔ Forbidden Files ✅ Pass —
🧪 Unit Test ✅ Pass —
🔎 pre-commit ✅ Pass —
🚫 Draft PR 🔜 To Be Enabled —
🚩 Feature Flag 🔜 To Be Enabled —
📊 Code Coverage 🔜 To Be Enabled —
🤖 therock-pr-bot ✅ Pass —

🎉 All checks passed! This PR is ready for review.

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

🙋 Wish to Override Policy?

@therock-pr-bot

Copy link
Copy Markdown

🎉 All checks passed! This PR is ready for review.

@shumway
shumway force-pushed the users/shumway/aick-2742-llvm24-artifacts branch from 80a6329 to 94cfd94 Compare October 29, 2026 21:47

@CongMa13 CongMa13 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.

LGTM

@cgmillette

Copy link
Copy Markdown
Contributor

Automated review: Model - qwen3.6:35b-a3b-coding-mtp-q4_K_M, effort: max

PR #14692 — qualify rocKE LLVM 24 lane (shumway, AICK-2742) — 🔴 First-round: blocking — CI is red from this PR's own artifacts: seven library goldens and six llvm24 differential hashes were not re-blessed, and the LLVM 24 arch-domain column was measured with a different compiler than CI's (N1, N2); the two engines match at llvm24

Prior item Status
CongMa13 (10-29) APPROVED at 94cfd945 (head): "LGTM" 🟡 At head, but given at 22:17Z, before the rocKE lanes failed (from 23:15Z); it does not address N1–N2
shumway (body, 10-29): LLVM 20/22/23 golden sections unchanged; byte identity at all four flavors; 333/333 LLVM 24 modules valid; the LLVM 24 arch-domain CTest passes without skipping; LLVM 24 representative and differential goldens pass 🟡 Partly. Confirmed: the llvm20/22/23 and canonical sections have 0 removed and 0 changed configs (the −15 diff lines are re-serialization), the representative golden passes at all four flavors, and the engines are byte-identical at llvm24 (ran; see Our checks). Not at this head: the differential golden fails at llvm24 (N1), the arch-domain CTest fails with CI's compiler (N2), and 333/333 holds for the author's compiler only (N3)
Bots / CI 🔴
• Policy bot pass (10-29). At head 94cfd945: pre-commit, clang-tidy, Component CI, the hipDNN superbuild, the Multi-Arch ASAN run and base freshness pass. The Multi-Arch CI summary is red from the rocKE lanes below.
• Linux gfx94X hipkernelprovider, shards 1/2 and 2/2, attempt 1 (23:06–23:25Z) and the 00:09Z re-run: the same 4 of 49 lanes fail every time: rocke_arch_domain_reproducibility (N2), rocke_differential_golden_ll (llvm24 mx_gemm[0..5], N1), and rocke_library_mla_pytest and rocke_library_gdn_pytest (golden aliases {'llvm24': 'llvm23'} do not match emission-profile aliases {}, N1). The re-run's shard 2/2 also hit the 60 s per-test limit in test_ir_cases_match_golden_sha256, a timeout other PRs saw today.
• Windows gfx110X, both shards, attempt 1 (done 00:08Z): the same differential, MLA and GDN failures. The arch-domain gate skips there (no clang on the runner). Shard 2/2's conv-lane failure is a 30 s per-test timeout in test_direct_kernel_cache.py, which passes on shard 1/2. The Windows re-run is still running.
• They are this PR's: on other PRs' gfx94X shards from 21:09Z to 23:02Z (for example #14677 and #14632), the three test lanes pass and the arch-domain gate skips ("no committed column for llvm24"). Develop's own Multi-Arch runs at 22:42Z and 23:27Z were docs-only and ran no hipkernelprovider tests. A re-run cannot clear them (read: CI logs)
Our checks 🔴
• Merge (ran): clean with develop d730d162 (7 behind, 2 ahead; merge c578b312). Native build OK, ctest 33/33. Its arch-domain gate skipped because our run pinned llvm22 against an LLVM 24 clang, so it did not exercise N2. Byte identity is GREEN at llvm20/22/23 for f64_mma and at llvm22 for every family. Representative golden PASS (it checks all four flavors). Differential golden: canonical OK; ll fails only at llvm24, on the same six mx_gemm configs as CI (N1). The PR's tests on CPU: 787 passed, 21 skipped; the one failure (test_unsigned_int_ops.py::test_hip_add_nuw_compiles_without_nsw) fails on develop too. The barrier_fence (10) and f64_mma (6) configs compile with clang 24: 0 failures, 0 spills. Rules 1–3 clean.
• Engine parity at llvm24 (ran): C++ vs Python is byte-identical for gfx1250_lowering (113 configs, including the named-barrier config), optimization_barrier (7) and f64_mma (6). In both engines, llvm24 differs from llvm23 only in the four named-barrier declarations (ptr addrspace(15)) and an addrspacecast ptr addrspace(3) … to ptr addrspace(15) before each of the four calls. The flattened C++ LLVM24 table (data.cpp:519, AICK-2857) equals Python's llvm24 table entry for entry (9 entries), and the C++ arch-domain table is generated at build time from the same JSON columns and COLUMN_ALIASES (read).
• Golden content (ran): on the configs it shares with llvm23, the llvm24 section matches except one gfx1250_lowering config (the named barriers) and the six stale mx_gemm entries. Develop's three rocKE commits since the base need no re-bless
# Sev file:line Finding
N1 🔴 library/tests/golden/{mla_prefill_gfx942,gdn_decode_gfx950,kda_gfx942,kda_gfx950,attention_dense_gfx942,attention_dense_bwd,dsa_indexer}_ir_sha256.json:2, differential/golden/llvm_gfx_all.json:8596 Problem: the re-bless is incomplete. (a) With the alias gone, LLVM_EMISSION_ALIASES is {} and llvm24 is a profile of its own, and check_golden (ir_golden.py:98) requires every golden to match both. These seven library goldens still carry "aliases": {"llvm24": "llvm23"} and no llvm24 document. (b) The six llvm24 mx_gemm hashes are llvm23's hashes from before #14239, which changed the mx_gemm IR and is already in this PR's base. They were recorded on an older tree and kept through the rebase.
Consequence: rocke_library_mla_pytest, rocke_library_gdn_pytest and rocke_differential_golden_ll fail on all four CI shards at this head, and after merge they would fail on every PR. The DSA, KDA and attention-dense goldens fail the same way, but no lane that this CI tier runs covers them (ran on the merge: the MLA golden test fails 1 of 4, and every DSA case fails assert {'llvm24': 'llvm23'} == {}; a probe shows all seven goldens fail the alias check on the merge and pass it on develop).
Fix: re-record the seven goldens with each test's --write. For MLA, KDA gfx942, attention-dense gfx942 and GDN decode, llvm24 lowers exactly as llvm23 does, so only the metadata and a copied document change (ran). Then run run_diff.py --mode ll --python-only --record-golden --flavor llvm24 --only mx_gemm. On the merge, that changes exactly those six lines, to llvm23's current hashes, and the check then passes (ran: on a scratch copy of the golden)
N2 🔴 core/arch/data/intrinsic_arch_domain.llvm24.json:7701 Problem: the refresh commit 94cfd945 re-measured the llvm24 column with clang 4208a889. CI's LLVM 24 is 2792f8ce, the compiler the first commit measured. CI's regeneration reports 33 changed cells, starting with fmuladd/maxnum/minnum.bf16 on gfx1250 back to arch_absent and named-barrier cells on non-gfx12 targets back to toolchain_crash, and its tally (552 arch_absent, 1010 ok, 54 toolchain_crash) is exactly the first commit's column. On develop the gate skips ("no committed column for llvm24"), so this PR is what turns it on.
Consequence: rocke_arch_domain_reproducibility fails on both Linux gfx94X shards in both attempts, and after merge it would fail on every PR. "Passes without skipping" holds on the author's compiler only. Any later TheRock LLVM 24 bump that moves a probe result can break the gate the same way until someone re-measures.
Fix: commit the column CI reproduces by reverting 94cfd945. The llvm24 goldens were recorded under that column and, apart from N1's mx_gemm, still pass under the refreshed one, so no golden depends on the difference. Or land this with a TheRock LLVM bump to the measured compiler (4208a889). Either way, decide how the gate should treat compiler bumps before it blocks every PR
N3 🟡 core/llvm_profile.py:222, core/lower_llvm.py:986, cpp/core/llvm_profile.cpp:25 Problem: the llvm24 lane is chosen by LLVM major version, but LLVM 24 builds disagree on the named-barrier ABI. The 24.0.0git build on our host (d6f6cb69) rejects the new declarations ("intrinsic argument 0 type expected ptr addrspace(3), but got ptr addrspace(15)") and compiles the llvm23 shape for gfx1250. CI's 2792f8ce and the author's 4208a889 accept addrspace(15): both measured columns record these intrinsics as ok on gfx1250.
Consequence: on such a build, gfx1250 named-barrier kernels (for example examples/gfx1250/isa_features/barrier_verify.py:85) stop compiling with this PR, while develop's llvm23 shape compiles there. The arch-domain generator cannot measure that compiler either (probe_error … input module is broken), and 333/333 holds for the author's compiler only (ran: opt -passes=verify and clang -c for gfx1250 on gfx1250_lowering config 16 at both flavors, and a partial generator run).
Fix: pick the named-barrier address space from a one-time toolchain probe, or record the oldest qualified LLVM 24 commit and refuse older 24.0.0git builds with a clear message

Utility: 🟢 Positive — real LLVM 24 lane, engines byte-identical; goldens and column need refreshing.


Legend: 🔴 blocking · 🟠 should-fix · 🟡 minor nit · 🟢 info/good · ⚪ retracted

First-round review: a local qwen3.6 model made the independent first pass, and the orchestrator (Claude Opus 5.5) verified it. On a clean merge with develop, it ran the native build and ctest, byte identity (adding C++ vs Python at llvm24 for three families), both golden gates, a targeted llvm24 mx_gemm re-bless into a scratch copy of the golden, two library golden tests, and alias probes of all seven library goldens on the merge and on develop. It traced the six stale hashes to #14239 and the column drift to the compiler commit. It read the six finished hipkernelprovider job logs at head and other PRs' logs from the same hours, and checked the named-barrier IR with a local LLVM 24 build. The orchestrator owns this merge-worthiness call. It flags whether a closer look is needed; it is not an approval or a rejection.

@shumway
shumway force-pushed the users/shumway/aick-2742-llvm24-artifacts branch from 94cfd94 to f1795d5 Compare October 30, 2026 15:19
@shumway
shumway requested a review from a team as a code owner October 30, 2026 15:19
@github-actions github-actions Bot added the rocke-lib: attention Touches rocKE library attention/FMHA kernels label Oct 30, 2026
@shumway

shumway commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the blocking review findings and separated the work into three commits:

  1. b2f5d849dc — LLVM 24 functional qualification and measured arch-domain artifact.
  2. eeb4717cc8 — complete the seven library LLVM 24 golden documents and refresh the six stale mx_gemm hashes.
  3. f1795d58c9 — bind exact arch-domain reproduction to the compiler identity recorded in the artifact.

The reproducibility CTest no longer assumes that all development builds with the same LLVM major have identical intrinsic availability. It performs the exhaustive cell-for-cell comparison when compiler provenance matches. A different compiler build now reports UNVALIDATED, prints both identities, and returns CTest’s explicit skip code rather than failing unrelated PRs or claiming successful reproduction.

Validation:

  • Python/C++ byte identity is green for LLVM 20, 22, 23, and 24.
  • Full differential golden checks are green for all four flavors.
  • Platform tests: 5082 passed, 1820 skipped.
  • Updated library golden tests: 68 passed, 94 skipped.
  • Arch-domain tests: 79 passed with 6603 subtests passed.
  • Pre-commit passed over the complete PR range.

Broader cross-revision LLVM qualification, runtime ABI probing, and declaration-table composition remain deferred and are not included in this PR.

@cgmillette

Copy link
Copy Markdown
Contributor

Automated review: Model - qwen3.6:35b-a3b-coding-mtp-q4_K_M, effort: max

PR #14692 — qualify rocKE LLVM 24 lane (shumway, AICK-2742) — 🟠 Follow-up: blockers fixed, rebase needs re-bless

Prior item Status
CongMa13 (10-29), iq136boy (10-30) APPROVED at 94cfd945 🟡 Stale
• predate eeb4717c goldens and f1795d58 gate policy (ran: range-diff)
• GitHub now reports review required
shumway (10-29 body, 10-30 reply): goldens, byte identity, CTest claims 🟡 Partly
• at head: llvm20–23 untouched; llvm24 = llvm23 except named barriers (ran: blob diff)
• "CTest passes without skipping" stale: skips on CI's compiler
• "green at four flavors" holds pre-merge only (N1, N2)
Our 10-30 N1: 7 library goldens, 6 mx_gemm llvm24 hashes 🟢 FIXED eeb4717c
• 7 goldens alias-free; llvm24 docs = llvm23's (read)
• mx_gemm[0..5] = our 10-30 re-bless output (read)
Our 10-30 N2: llvm24 column measured off CI's compiler 🟢 ADDRESSED f1795d58
• gate skips, named UNVALIDATED, on any other compiler build (read)
• column still 4208a889; CI had 2792f8ce: unchecked there
Our 10-30 N3: named-barrier ABI picked by LLVM major 🟡 DEFERRED
• author: "runtime ABI probing … remain deferred"
• OK while LLVM 24 is a dev lane; no ticket named
Bots / CI 🟡 Running
• running: math-libs gfx94X, gfx950, gfx1250, gfx110X; no rocKE lane yet
• 22 ✓, 24 skipped; policy bot ✓
• merge: CONFLICTING since #14679; this run tests the 15:19Z ref (read)
Our checks 🟠 Conflict
• merge vs 5cc7cef4: modify/delete conflict, 1 file; 36 behind (ran)
• build, ctest, byte identity, goldens: skipped, no clean merge
• merge-tree copy: test_ir_golden 16 ✓ / 1 ✗; llvm24 column −3 keys (ran)
• head: 92 ✓ in 3 test files (ran: qwen); rules 1–3 clean (ran)
# Sev file:line Finding
N1 🟠 platform/tests/golden/rocke_representative_ir_sha256.json:2 Edits the monolithic golden that #14679 split into 35 shards
• impact: modify/delete conflict; shards keep the llvm24→llvm23 alias, no llvm24 for 342 cases (ran: merge-tree)
• fix: delete the file; after the rebase run platform/tests/instances/rocke_ir_parity_harness.py --write platform/tests/golden/rocke_representative_ir_sha256, no --only (shard aliases must agree)
N2 🟠 differential/golden/llvm_gfx_all.json, core/test_ir_golden.py:177, arch/data/intrinsic_arch_domain.llvm24.json Clean auto-merges still leave llvm24 behind develop
• impact: conv_abi[13] keeps its pre-#14393 hash → differential gate red; +32 configs unblessed (read)
• impact: develop's shard-alias test fails on {} aliases (ran); column misses trap and buffer i8 keys (ran)
• fix: run_diff.py --mode ll --python-only --record-golden --flavor llvm24; patch that test's GOLDEN_ALIASES; regenerate the column on 4208a889

Utility: 🟢 Positive — qualifies LLVM 24 with engine parity; rebase must re-record llvm24 artifacts.


Legend: 🔴 blocking · 🟠 should-fix · 🟡 minor nit · 🟢 info/good · ⚪ retracted

Follow-up review: first pass by a local qwen3.6 model, verified by the orchestrator (Claude Opus 5.5). Checks: range-diff vs 94cfd945, merge-tree vs develop 5cc7cef4, golden and column diffs, test_ir_golden on the merge, CI at head. Flags whether a closer look is needed; not an approval or rejection.

@CongMa13

Copy link
Copy Markdown
Contributor

I reviewed this PR again. The following review threads are still unresolved, or comments have no author reply:

If you have already fixed these, please reply on each comment to say so and resolve the threads.

@shumway

shumway commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up review findings N1 and N2 are addressed by merge commit 9c647edf38.

  • Merged current develop; GitHub now reports the PR as mergeable.
  • Resolved the representative-golden conflict introduced by the per-family shard migration.
  • Regenerated all representative LLVM 24 shard documents with the current 342-case corpus.
  • Re-recorded the complete LLVM 24 differential golden: 94 families and 1897 configurations.
  • Updated the shard alias regression test for LLVM 24’s independent profile.
  • Regenerated the LLVM 24 arch-domain column on its recorded 4208a889 compiler, including the new trap and raw-buffer i8 keys. Exact-provenance regeneration passes with 205 declaration keys.
  • Audited TESTING.md, platform/tests/README.md, the toolchain/arch-domain design docs, CMake registration comments, and generator documentation. They now consistently state that exact reproduction runs only with matching compiler provenance; a mismatch is a named unvalidated skip and does not establish reproduction coverage.

Validation after merging develop:

  • Platform tests: 5200 passed, 1886 skipped, 17109 subtests passed.
  • Python/C++ byte identity is green at LLVM 20, 22, 23, and 24.
  • Differential golden checks are green at all four flavors.
  • Exact-provenance LLVM 24 arch-domain regeneration is green.
  • Updated library golden tests: 68 passed, 94 skipped.
  • Pre-commit passed over the complete PR range.

N3 remains intentionally deferred: this PR qualifies the recorded LLVM 24 development lane and does not claim compatibility with every LLVM 24 development snapshot. Runtime ABI probing remains outside this PR’s scope.

There are currently no unresolved inline review threads. A fresh approval is needed because the previous approvals predate the updated commits.

@tenpercent tenpercent 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.

Thanks!

@cgmillette cgmillette 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.

lgtm

@cgmillette
cgmillette enabled auto-merge (squash) October 30, 2026 17:15

@CongMa13 CongMa13 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.

No new P0 or P1 issues were identified during this review. The changes are approved.

@shumway

shumway commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the blocking review findings and separated the work into three commits:

  1. b2f5d849dc — LLVM 24 functional qualification and measured arch-domain artifact.
  2. eeb4717cc8 — complete the seven library LLVM 24 golden documents and refresh the six stale mx_gemm hashes.
  3. f1795d58c9 — bind exact arch-domain reproduction to the compiler identity recorded in the artifact.

The reproducibility CTest no longer assumes that all development builds with the same LLVM major have identical intrinsic availability. It performs the exhaustive cell-for-cell comparison when compiler provenance matches. A different compiler build now reports UNVALIDATED, prints both identities, and returns CTest’s explicit skip code rather than failing unrelated PRs or claiming successful reproduction.

Validation:

  • Python/C++ byte identity is green for LLVM 20, 22, 23, and 24.
  • Full differential golden checks are green for all four flavors.
  • Platform tests: 5082 passed, 1820 skipped.
  • Updated library golden tests: 68 passed, 94 skipped.
  • Arch-domain tests: 79 passed with 6603 subtests passed.
  • Pre-commit passed over the complete PR range.

Broader cross-revision LLVM qualification, runtime ABI probing, and declaration-table composition remain deferred and are not included in this PR.

@cgmillette

Copy link
Copy Markdown
Contributor

Automated review: Model - qwen3.6:35b-a3b-coding-mtp-q4_K_M, effort: max

PR #14692 — qualify rocKE LLVM 24 lane (shumway, AICK-2742) — 🟡 Follow-up: N1–N2 fixed, CI pending

Prior item Status
CongMa13, tenpercent, cgmillette (10-30) APPROVED at 9c647edf 🟢 Current
• all three at head
• missing: a rocke-lib code-owner approval
iq136boy (10-30) APPROVED at 94cfd945 🟡 Stale
• predates eeb4717c, f1795d58, 9c647edf; still counts
shumway (10-29 body, 10-30 replies): validation claims 🟡 Mostly verified
• 342 cases, 1897 configs, 205 keys hold on merge (ran)
• not rerun: native byte identity, full platform suite
• body still says "passes without skipping", 333/333
Our 10-29 N1: 7 library goldens, 6 mx_gemm hashes 🟢 FIXED eeb4717c
• untouched by the merge; llvm24 docs = llvm23 (ran)
Our 10-29 N2: llvm24 column off CI's compiler 🟢 ADDRESSED f1795d58
• off 4208a889 the gate exits UNVALIDATED, named skip (ran)
Our 10-29 N3: named-barrier ABI picked by LLVM major 🟡 DEFERRED
• author: qualifies the recorded snapshot; probing out of scope
• fine for a dev lane; no ticket named
Our 10-30 N1: edits monolithic golden, not 35 shards 🟢 FIXED 9c647edf
• file gone; 35 shards aliases {}, 342 llvm24 cases (ran)
• --check OK at llvm20/22/23/24 on the merge (ran)
Our 10-30 N2: auto-merge leaves llvm24 behind develop 🟢 FIXED 9c647edf
• conv_abi[13] re-blessed; llvm24 0 changed, 0 NEW (ran)
• alias test passes; column adds trap, buffer i8 (ran)
Bots / CI 🟡 Running
• running: Linux compiler stage; 4 math-libs stages queued; rocKE lanes not started
• 21 ✓, 11 skipped; hipDNN superbuilds ✓
• merge: clean; waits on rocke-lib review, Multi-Arch summary
Our checks 🟢 Clean
• merge vs d3ffe88c: clean, 6 behind (ran)
• representative + differential _ll at 4 flavors, canonical: OK (ran)
• 435 ✓ / 426 skip (no engine, no GPU); rules 1–3 clean (ran)

Net-new: none.

Utility: 🟢 Positive — complete llvm24 artifacts on the merge; every golden gate passes locally.


Legend: 🔴 blocking · 🟠 should-fix · 🟡 minor nit · 🟢 info/good · ⚪ retracted

Follow-up review: first pass by a local qwen3.6 model, verified by the orchestrator (Claude Opus 5.5). Checks: merge-tree vs develop, representative and differential goldens at four flavors, arch-domain gate, targeted pytest, rules scan, CI at head. Flags whether a closer look is needed; not an approval or rejection.

@shumway shumway changed the title feat(hip-kernel-provider): qualify rocKE LLVM 24 lane test(rocke): qualify rocKE LLVM 24 lane Oct 30, 2026

@cgmillette cgmillette 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.

Automated merge-queue hold (rocKE merge monitor)

Hi @shumway, this PR is held in the rocKE merge queue: its LLVM 24 representative goldens are incomplete, so the installed golden gate fails at its head and on a merge with today's develop (ca118033). Develop itself passes, because it still aliases llvm24 to llvm23.

What fails: platform/tests/rocke_installed_golden_test.py reports FAIL for the llvm24 flavor.

  • At the head 50dc1852 alone: 5 cases have no llvm24 entry. They are the gfx1250 depthwise dgrad cases that #14386 added at this branch's merge base (43d958ba): conv_direct/gfx1250/dw_dgrad_stream_k3_w32, dw_dgrad_stream_k3_cpl2_w32 and dw_dgrad_stream_k5_s2_bf16_cpl8_w32, and conv_direct_depthwise_tiled/gfx1250/dgrad_bf16_k31_w32 and dgrad_fp16_k51x5_w32. For example, conv_direct.json has 30 cases for llvm20, llvm22 and llvm23 but 27 for llvm24.
  • On the merge with develop: 29 more llvm24 cases in attention_d256 and attention_dense (5 new, 24 changed). #14367 (landed 10-30 20:44Z) changed those kernels and re-recorded the two shards for llvm20, llvm22 and llvm23 only.

Fix: rebase onto develop, re-record the llvm24 entries of every shard on the rebased tree (the same re-record this PR already does), and check that rocke_installed_golden_test.py passes.

Once it's fixed, push and re-request a review from @cgmillette. A held PR needs that explicit re-approval before it can merge.

@cgmillette
cgmillette disabled auto-merge October 30, 2026 21:51
@cgmillette

Copy link
Copy Markdown
Contributor

Automated merge-queue status (rocKE merge monitor)

Hi @shumway, I turned auto-merge off on this PR for now. Before a rocKE PR lands, the rocKE merge monitor checks it on top of today's develop branch, and this version would not land cleanly:

  • merged with today's develop branch, the stored expected outputs (golden files) no longer match (llvm24 goldens incomplete: 5 gfx1250 dgrad cases from 14386 missing at head, 29 attention cases stale after develop's 14367)

What to do: re-record (re-bless) the affected golden files on top of the current develop branch. After that, turn auto-merge back on; the monitor re-checks every push.

Nothing else changed: the monitor does not approve, reject or merge PRs. It only turned auto-merge off to keep develop green. This comment is updated in place.

@shumway
shumway force-pushed the users/shumway/aick-2742-llvm24-artifacts branch from 50dc185 to d1e6aee Compare October 31, 2026 02:31
@shumway

shumway commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto current develop (809c17de2f) by replaying the scoped PR commits, removing the accumulated merge commits.

Addressed the merge-monitor and follow-up review findings:

  • Re-recorded all 35 representative golden shards at every flavor. LLVM 24 now contains the complete current 354-case corpus, including the five depthwise-dgrad cases and the attention changes called out by the monitor.
  • Re-recorded the complete LLVM 24 differential golden: 95 families and 1980 configurations.
  • Refreshed the explicit LLVM 24 gfx942 dense-attention library golden after the latest attention changes.
  • Restored the measured 205-key LLVM 24 arch-domain column, including trap and raw-buffer i8 load/store.
  • Corrected the shard alias-consistency regression test for LLVM 24’s independent emission profile.

Validation on the rebased tree:

  • Installed representative golden gate passes at LLVM 20, 22, 23, and 24.
  • Differential golden checks pass at all four flavors.
  • Python/C++ byte identity is green at all four flavors.
  • Platform tests: 5215 passed, 1886 skipped, 17109 subtests passed.
  • Updated library golden tests: 68 passed, 94 skipped.
  • Arch-domain and golden infrastructure tests: 96 passed, 6699 subtests passed.
  • Pre-commit passed over the complete rebased PR range.

Exact arch-domain reproduction remains provenance-bound. This host has a different LLVM 24 build, so it correctly reports the lane as unvalidated rather than claiming reproduction.

@shumway
shumway requested a review from cgmillette October 31, 2026 02:55
@shumway
shumway force-pushed the users/shumway/aick-2742-llvm24-artifacts branch from d1e6aee to 4bfa24e Compare October 31, 2026 03:02
@shumway
shumway dismissed cgmillette’s stale review October 31, 2026 03:09

This requested change has already been included in my follow up commmits.

@cgmillette

Copy link
Copy Markdown
Contributor

Automated review: Model - qwen3.6:35b-a3b-coding-mtp-q4_K_M, effort: max

PR #14692 — qualify rocKE LLVM 24 lane (shumway, AICK-2742) — 🔴 Follow-up: hold fixed, new llvm24 gap

Prior item Status
Our 10-29 N1: 7 library goldens, 6 mx_gemm hashes 🟢 FIXED 508886f2
• alias-free; llvm24 = llvm23; llvm20–23 = develop (read)
• gfx942 dense attention re-recorded in 4bfa24e8
Our 10-29 N2: llvm24 column off CI's compiler 🟢 ADDRESSED 8f2eb94c
• same patch as f1795d58 (ran: range-diff)
• gate exits UNVALIDATED here; CTest skips (ran)
Our 10-29 N3: named-barrier ABI picked by LLVM major 🟡 DEFERRED
• author: qualifies the recorded snapshot; probing out of scope
• fine for a dev lane; no ticket named
Our 10-30 N1: edits monolithic golden, not 35 shards 🟢 FIXED 4bfa24e8
• file gone; 35 shards aliases {}, 354 llvm24 cases (read)
Our 10-30 N2: auto-merge leaves llvm24 behind develop 🟢 FIXED 4bfa24e8
• llvm24: 1980 configs, 0 changed, 0 NEW at head (ran)
• column: 205 keys incl. trap, buffer i8 (read)
• today's develop reopens the gap: N1
iq136boy (10-30) APPROVED at 94cfd945 🟢 APPROVED
• before the 10-31 rebase; still counts on develop
tenpercent, CongMa13, AnaghaRaoAMD (10-30) APPROVED at 50dc1852 🟢 APPROVED
• before the 10-31 rebase; still count on develop
cgmillette (10-30) hold: llvm24 goldens incomplete 🟢 FIXED 4bfa24e8
• 5 dgrad + 29 attention llvm24 cases present, = llvm23 (read)
• installed golden gate ✓ at llvm20–24 on head (ran)
• change request dismissed; cgmillette's re-approval still needed
shumway (10-29 body; 10-30, 10-31 replies): validation 🟡 Mostly
• 354 cases, 1980 configs, 205 keys hold (read)
• 10-30 doc audit lost in the rebase (N2)
• body still: "passes without skipping", 333/333, 4638 passed
Bots / CI 🟡 Running
• running: gfx94X hipkernelprovider ×2, hipdnn-samples, hipdnn-integration-tests; Windows gfx110X build
• 30 ✓, 0 ✗; hipDNN superbuilds ✓
• merge ref predates develop 7cd54ff9: CI cannot see N1 (read)
Our checks 🔴 Golden ✗ on merge
• merge vs 7cd54ff9: clean; golden gate ✗ at llvm24, 8 cases (ran)
• head: ctest 34 ✓ + 1 named skip; byte identity ✓ llvm20–24; goldens ✓ (ran)
• tests 795 ✓ / 22 skip; compile 6 of 16 families clean; rules 1–3 clean (ran)
# Sev file:line Finding
N1 🔴 platform/tests/golden/rocke_representative_ir_sha256/attention.json Merge with today's develop: 8 llvm24 attention goldens missing or stale
• impact: after #14616's LSE cases, rocke_golden_static fails llvm24: 6 missing, 2 reduce_lse stale (ran)
• fix: merge develop, then in platform/: python tests/instances/rocke_ir_parity_harness.py --write tests/golden/rocke_representative_ir_sha256 (ran: only attention.json llvm24 changes; gate ✓); bless the 15 new llvm24 differential configs
N2 🟡 TESTING.md:499, platform/tests/README.md:143, tools/gen_arch_domain.py:75 (+3) Rebase dropped the 10-30 doc audit (it lived in a merge commit)
• impact: 6 files again call the reproduction CTest a full sweep; it skips off the recorded compiler
• fix: re-apply the doc hunks of git show --remerge-diff 9c647edf

Utility: 🟢 Positive — measured LLVM 24 lane with engine parity; one more re-record needed.


Legend: 🔴 blocking · 🟠 should-fix · 🟡 minor nit · 🟢 info/good · ⚪ retracted

Follow-up review: first pass by a local qwen3.6 model, verified by the orchestrator (Claude Opus 5.5). Checks: history map vs 50dc1852, goldens by key, golden gate and a trial re-record on the merge with develop 7cd54ff9, build + ctest, byte identity at four flavors, differential goldens, tests, CI at head. Flags whether a closer look is needed; not an approval or rejection.

@shumway
shumway merged commit 37e8aeb into develop Oct 31, 2026
163 of 166 checks passed
@shumway
shumway deleted the users/shumway/aick-2742-llvm24-artifacts branch October 31, 2026 11:36
@cgmillette

Copy link
Copy Markdown
Contributor

Automated develop-health notice (rocKE merge monitor)

A follow-up for this PR, merged as 37e8aeb87c: develop's rocke_golden_static now fails at llvm24, on the gap the last review on this PR named.

Failing check rocke_golden_static, the installed representative-IR golden gate, which runs in every hipkernelprovider CI shard
Signature llvm24 only: 6 attention LSE cases missing (2d_lse_mfma32, 2d_lse_striped16, 2d_lse_transposed32, bf16 d128, on gfx942 and gfx950) and 2 reduce_lse_bf16_d128 hashes stale. llvm20, llvm22 and llvm23 pass
Evidence Reproduced on develop 37e8aeb87c itself. A bisect over the two rocKE merges since the last green check: a15b4f5826 (the merge before this one) passes, 37e8aeb87c (this merge) fails
Develop issue #14815
Fix Re-record the representative goldens on develop (below). On a trial merge with develop this changed only the llvm24 attention entries, and the gate then passed at all four flavors

From dnn-providers/hip-kernel-provider/rocke/platform:

python tests/instances/rocke_ir_parity_harness.py --write tests/golden/rocke_representative_ir_sha256

Please fix forward with a small PR that re-records these entries and references #14815.

shumway added a commit that referenced this pull request Oct 31, 2026
## Summary

Fix forward the rocKE installed golden failure introduced when the LLVM
24 representative goldens landed without the attention LSE cases
subsequently merged into `develop`.

This re-records only the LLVM 24 attention entries. Reverting the LLVM
24 qualification would remove intended test coverage, so updating the
stale golden is the safer fix-forward.

## Risk Assessment

Risk level 1. This changes generated regression-test metadata only; it
does not change kernel emission or product behavior. LLVM 20, LLVM 22,
and LLVM 23 entries are unchanged.

## Related

- Work tracking: #14815
- Related PRs: #14692, #14616

Fixes #14815

## Device / Architecture Coverage

No GPU validation is required because this is a host-only
representative-IR golden update. The affected cases cover `gfx942` and
`gfx950`, and the installed golden gate evaluates every recorded LLVM
flavor without requiring local hardware.

## Testing Summary

- Reproduced by the failure recorded in #14815.
- Confirmed the refreshed installed golden passes for LLVM 20, LLVM 22,
LLVM 23, and LLVM 24.
- Confirmed the diff contains only six new LLVM 24 LSE cases and two
refreshed LLVM 24 `reduce_lse` entries.

## Testing Checklist

- [x] Installed representative-IR golden gate — `cd platform &&
PYTHONPATH="$PWD/python:$PWD/../library" python
tests/rocke_installed_golden_test.py` — Status: Passed
- [x] Golden flavor-diff audit — LLVM 20–23 unchanged; LLVM 24 has six
additions and two expected updates
- [ ] PR CI — GitHub PR checks — Status: Pending

## Flags / Guardrails

None. This does not alter runtime behavior.

## Adjacent Tests Considered

The byte-identity and GPU numeric lanes are not required because emitted
IR and kernel behavior are unchanged. The installed representative-IR
golden gate is the lowest-level test that directly reproduces and
validates this regression.

## Technical Changes

- Add the six missing LLVM 24 attention LSE representative cases for
`gfx942` and `gfx950`.
- Refresh the two stale LLVM 24 `reduce_lse` hashes for `gfx942` and
`gfx950`.
- Preserve all LLVM 20, LLVM 22, and LLVM 23 golden entries unchanged.
AviralGoelAMD added a commit to Parthiv911/rocm-libraries that referenced this pull request Nov 1, 2026
Resolve conflict in attention_dense_gfx942_ir_sha256.json: develop (ROCm#14692)
qualified the LLVM 24 lane (aliases {} + explicit llvm24 hashes). Re-blessed
with test_attention_dense_gfx942_golden.py --write: 0 existing hashes changed;
adds llvm24 entries for the 12 KDB/VPF cases this PR introduced.
@assistant-librarian

Copy link
Copy Markdown
Contributor

TheRock Submodule Bump Activity

Newest first

renjithravindrankannath pushed a commit that referenced this pull request Nov 3, 2026
…se MMA instruction (#14328)

## Motivation

rocKE should know every production target its MMA catalog names, and
should be able to issue every dense MMA instruction each of those
targets has, in both engines. Today some targets are unknown, several
MMA lowerings print a fixed operand type around any value, and integer
WMMA signedness is hard-coded to signed. This PR makes the ISA backends
complete for the dense instructions:
- every op is described as data;
- every target compiles for itself where its LLVM flavor accepts the
name;
- operand signedness comes from the operand dtype.

ISSUE ID : AICK-2571

## Technical Details

The 18 feature commits below, then the review fixes listed under
**Changes after review** (and merges of develop). Each builds and passes
its own tests on its own, and the Python and C++ engines emit
byte-identical LLVM IR at every commit.

1. **Delete the duplicate f16 32x32x16 MFMA handler.**
2. **Resolve each LLVM flavor's intrinsic declarations in one place**,
in both engines. Each declaration generation (LLVM 22, 23, 24) holds
only its own changes and inherits the older ones.
3. **Describe matrix intrinsic calls as data.** `MATRIX_CALLS` lists
each op's intrinsic and operand forms. An op lowered through it is
refused on a target whose catalog does not list it.
4. **Let a target row take its facts from another row.** Every member of
a generic target gets a pointer row.
5. **Add the missing gfx targets.**
   - gfx908 gets a full fact row; its occupancy is measured with `llc`.
- gfx1100-1103 and gfx1150-1154 point to gfx11-generic; gfx1200 points
to gfx12-generic.
- Every new target's arch-domain cells are measured on each flavor's
compiler.
6. **Compile each target for itself where the compiler that runs accepts
it.** Otherwise it compiles for the generic its row points at; if
neither works, the compile fails loudly. The choice follows the LLVM
major of the compiler that will run (see Changes after review).
7. **Add CDNA f32, i8, f64, bf16 and mixed fp8 MFMA ops.** gfx942's f64
ops keep the lowering #13794 added; gfx90a and gfx950 list the f64
16x16x4 atom.
8. **Add gfx12 fp8, bf8, i8 and 16-bit-output WMMA ops.**
9. **Add gfx12 int4 WMMA ops, and derive integer WMMA signedness from
the operand dtypes.** The unsigned rows are named `_u8_i8`, `_i8_u8` and
`_u8_u8` (and the u4 equivalents). The gfx11 integer handler moves into
`MATRIX_CALLS`.
10. **Add gfx11 16-bit-output WMMA ops.**
11. **Describe MMA instructions whose result type differs from the
accumulator.**
- A row may carry a result dtype `dst`, the name agreed on #11642.
`MmaOp.dst_dtype` defaults to the accumulator dtype, and catalog queries
take `dst_dtype`.
- The C++ op struct grows, so the binary ABI goes from 6 (develop) to 7
in `abi.h` and in Python's `BINARY_ABI`.
    - Adds the gfx1250 bf16-result op.
12. **Add gfx1250 16-bit-output, fp8-to-f16 and i8 WMMA ops, and wire
f32 16x16x4.**
13. **Add the gfx1250 f8f6f4 and f4 32x16x128 WMMA ops.**
14. **Add the gfx950 f8f6f4 MFMA ops with a 6-bit or 4-bit operand.**
Covers every format pair, at both shapes.
15. **Add the larger-K variants of existing MMA shapes.**
16. **Accept logical and packed operands on the gfx1250 scaled WMMA
ops.** A and B can be logical fp8 vectors or packed 6/4-bit words, as
well as the padded `<16 x i32>` form. The gfx950 scaled MFMA ops keep
the packed-word form: their only caller already loads those words.
17. **Run the fp64 GEMM numerics on every target that admits them.**
They built for gfx942 only; they now build for the GPU they run on and
run on gfx90a, gfx942 and gfx950 (the hardware-verified targets, marked
`arch_specific`). An admitted target that has not run them yet skips, or
fails when the lane requires it.
18. **Move the fp64 GEMM numerics to their own file and share the GPU
checks.** `tests/numeric/test_f64_gemm_numeric.py` holds them; the
gfx942 f16/bf16 swizzle regression keeps its own gfx942 file. A CPU-only
test checks that both engines refuse fp64 `direct_to_lds` on targets
without DRAM-to-LDS DMA. Shared test helpers replace copies in the
numeric tests: `current_device_arch_in` (the GPU's arch if it is in a
list, else skip, and fail under `ROCKE_REQUIRE_<ARCH>=1`),
`available_engines` / `all_engines_backend`, and `universal_gemm` (lower
and launch a universal GEMM spec with a required target arch).

**Changes after review.** These commits follow the 18 above and change
behavior:
- **Compile-target routing follows the compiler that runs.**
`compile_kernel` and `lower_kernel_for_comgr` route by the LLVM major of
the COMGR compiler they load, and the hipcc helpers by hipcc's clang
major, through `compiler_target_for_llvm_major` in `rocke.core.arch`.
`ROCKE_LLVM_FLAVOR` still picks the emitted IR's conventions only. A
major in a qualified lane uses that lane's measured processor answers; a
newer or unknown major keeps the processor's own name, and a COMGR build
refuses a compiler it cannot place. The hipcc helpers now run `hipcc
--version` and raise if it prints no `clang version N.` line.
- **Dispatch candidates list each target with its own facts once.**
`arches_with_own_facts()` in `rocke.core.arch` gives the known targets
whose rows hold their own facts; norm and the unified attention paths
declare it, and the fp16/bf16 RCR WMMA GEMM candidates share
`RDNA_WMMA_GEMM_ARCHES`. A processor is admitted through the generic its
row points at (`listed_arch_for`), so example-parity builds each
distinct target once.
- **Generic members resolve through their generic's backend row, in both
engines.** The backend registries hold rows only for targets with facts
of their own; a member gets its generic's backend under its own name.
Both engines refuse an unknown target with the same message, built from
the registry.
- **The C++ engine's compiler processor rejections are generated** from
the arch-domain columns by `tools/gen_arch_domain_cpp.py`, through the
Python reader, instead of a hand-kept list.
- **New refusals, in both engines where both lower:** an f8f6f4 operand
that is short of its packed words (for example one fp4 word where eight
are needed) instead of zero-padding it; an MMA result declared in
another number format than the instruction returns instead of bitcasting
it; an arch-domain processor answer that is not a JSON boolean.
- **Universal GEMM test launches** pack the arguments the builder
declares (strides for every batched kernel) and default C to NaN in the
kernel's storage dtype.
- **Tests and docs.** The test-helper and gfx908 occupancy tests moved
under `platform/tests/support` and `platform/tests/benchmark`, where
`rocke_pytest` collects them; the shared llc helpers live in
`rocke.tests.llc`. The unknown-target verdict test skips on a host that
cannot judge any module, such as the installed test tree. The
backend-registry and arch-data ctests are in the provider's quick tiers,
and a test fails when a C++ test is in no tier. The fp64 GEMM docs name
gfx90a, gfx942 and gfx950 everywhere, with a test that checks every such
sentence, and the dispatch docs say that a listed generic target covers
its members.

Every lane map comes from an arbiter: hardware, a public calculator,
public ISA tables, or CK where it is the named reference. None is
invented. The docs list every new op and target: `dtype_support.md`,
`mfma_atom_catalog.md` and `mma_metadata.md`.

**Built on develop with #13976 and #13723:**
- #13976 removed the two gfx950 ops that do not exist on the hardware,
which was this PR's first commit, so that commit is gone.
- The gfx950 f8f6f4 16x16x128 rows call the declaration #13976 made
shared (`mfma.scale.f32.16x16x128.f8f6f4.v8i32.v8i32`), so a kernel that
mixes them with #13976's builder ops emits one `declare`.
- Develop's binary ABI is 6 (#14706, #14616); this PR is 7.
- Develop's LLVM 24 lane (#14692): the named-barrier declarations are
LLVM 24's own overrides in the chain, and the LLVM 24 arch-domain column
and goldens cover this PR's targets and ops.
- The LLVM 24 arch-domain column is regenerated with the llvm24 compiler
CI runs (AMD clang 24.0.0git, llvm-project 2792f8ceeb5a), and its header
now records that compiler. It answers 38 of develop's cells differently
from the build develop's column recorded: on the five targets without
gfx12 barriers the s.barrier.init/join/signal/signal.var/wait and
s.cluster.barrier declarations crash the compiler (`toolchain_crash`)
instead of being refused, the s.barrier.leave refusal has new wording,
and gfx1250 cannot select the bf16 fmuladd, maxnum and minnum. That
compiler accepts gfx1154 and gfx1250 by name, so at llvm24 both compile
for themselves.
- #14156 (gfx1250 LDS 320 KiB) is independent of this PR.

## Test Plan

- One test file per op group (Python, both engines in strict mode) and
one ctest per group (C++ builders and catalog lookups):
- the IR for every new op at llvm20, llvm22, llvm23 and llvm24, and both
engines equal;
  - the refusals, with their exact texts;
  - selection over every target and dtype;
  - lane-map checks against each arbiter;
  - compile and link per target.
- Numeric tests on hardware where a GPU is available: the gfx90a MFMA
f64, f32, i8 and bf16 ops, and the fp64 GEMM numerics on gfx90a, gfx942
and gfx950.
- The representative-IR golden gains the 10 new gemm cases (`gemm.json`
shard) at all four LLVM flavors, in commit 5. The other entries are
unchanged.

## Test Result

- Byte identity green at llvm20, llvm22, llvm23 and llvm24.
- ctest 46 / 46 at the head (the arch-domain reproducibility test skips
without its compiler).
- Full platform suite at the head (Python engine): 6015 passed, 0
failed.
- The portable-IR tests against a freshly built shared engine pass: 196.
- The touched tests pass with both engines in strict mode, apart from
`test_the_cpp_fallback_does_not_warn_twice`, which fails in strict mode
on develop too.
- The other platform test files and the library smoke: no new failure
against develop.
- pre-commit passes.
- Per-commit check: every commit builds, passes ctest and passes its own
tests (strict mode; the same develop test as above is the only
exception).
- The arch-domain columns equal a full regeneration at the head on
llvm20, llvm22, llvm23 and llvm24, cell for cell; the llvm24 column at
every commit is that commit's full regeneration with CI's llvm24
compiler.
- At llvm24 with CI's llvm24 compiler: the compile-module and target
identity tests pass, and so do the gfx90a numeric MFMA tests on a
gfx90a.
- gfx90a numeric tests pass.
- fp64 GEMM numerics, both engines in strict mode, against an fp64
reference (exact on integer inputs, within the runbook tolerance on
random inputs): every admitted config passes on gfx90a, gfx942 and
gfx950, with partial tiles and a problem smaller than one tile; the
Python and C++ IR are identical. gfx90a refuses the four `direct_to_lds`
configs (no DRAM-to-LDS DMA), as the test expects.
- The other targets are compile-verified.

## Submission Checklist

- [x] Look over the contributing guidelines at
https://github.com/ROCm/TheRock/blob/main/GOVERNANCE.md#pull-requests.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: John Shumway <jshumway@amd.com>
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.

6 participants