Skip to content

test(rocke): cover gfx942 and gfx950 in the dispatch and small platform tests (AICK-2822) - #15004

Merged
cgmillette merged 9 commits into
developfrom
users/congma13/rocke/aick-2822-arch-dispatch-small-dirs
Nov 7, 2026
Merged

cgmillette merged 9 commits into
developfrom
users/congma13/rocke/aick-2822-arch-dispatch-small-dirs

Conversation

@CongMa13

@CongMa13 CongMa13 commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

JIRA ID: AICK-2822

Draft until CI reports.


Summary — For human reviewers

The short version

This is story S06b of the epic that covers gfx942 and gfx950 in rocKE tests (S06a is #14713). It covers the dispatch tests and the small test directories under platform/tests. Each single-arch test is now parametrized over both archs or marked arch_specific with a reason.

What changes

Three commits, one for each group of directories. Only test files change.

  • dispatch_tests/gemm. 28 tests run on both archs, with per-arch expected values where the archs differ (MFMA intrinsic names, CU counts, warp tiles). 24 tests are arch_specific: the split-K cost model is fitted for gfx950 only, and split_k_cost_model("gfx942") returns None.
  • dispatch_tests/core, moe, norm, tuning.
    • Core, build, binding and norm tests run on both archs.
    • test_moe_matches_the_example_exactly is gfx950 only. The example spec is invalid on gfx942 (bf16 warp tile (16, 16, 32)).
    • The moe tests that name one arch are marked.
    • The eight classes in tuning/test_tuning_template.py are marked gfx950. The toy family names gfx950 in 33 fixed labels. The tuning mechanics do not depend on the arch. Parametrizing needs about 30 label changes. Reviewers: say if you prefer parametrization.
  • runtime, tools, analysis, numeric.
    • The comgr, device_info, arch-domain artifact, LDS registry and b32 LDS profile tests run on both archs.
    • The LDS profile tests with different bank behavior, the tf32 test and the f64 MFMA test are marked. Each reason states the difference.
    • test_lds_profile_gfx942.py and test_lds_profile_gfx950.py test their own profile only. Every test there is marked. The cases that both profiles share are in the new test_lds_profile_cdna_common.py, parametrized over both archs.
    • Last commit: test_f64_gemm_rejects_unsupported runs on both archs with per-arch messages and LDS caps. The fp64 pad budget test, the moe fp8 K=128 catalog test, the gfx942 lds_swizzle numeric test and five dsl_probes tests are marked.

Behavior changes to check

  • The gemm runtime tests gated on gfx950 before. They now also run on a gfx942 runner. They passed on one gfx942 device.
  • test_dispatch_gfx950_request is renamed test_dispatch_cdna_request.

How this was tested

  • 478 tests passed, 8153 subtests passed, on the changed files before the last two commits. The run excluded core/test_example_parity.py::TestEveryRegisteredKernelBuilds. That pair builds every kernel on every arch and is too slow for a local run.
  • Docker, llvm20 (rocm7.1.1), llvm22 (rocm7.2) and llvm23 (rocm10.1_therock): 473 passed, 10 skipped, 0 failed on the 27 files at the merge commit. The last commit's 4 files: 56 passed, 26 skipped, 0 failed on each flavor. The skips need a GPU. The containers have none.
  • The local GPU is a gfx942. The gfx950 cases ran without a gfx950 device.
  • ruff check without --fix: no new finding on the changed files. Pre-commit passes.
  • Scan, with a script that reads arch_specific, scope of AICK-2822: unmarked single-arch tests go from 175 on develop to 7. The 7 are scan false positives (an arch name in a label, comment or docstring). Marked tests go from 2 to 78. Tests that run on both archs go from 28 to 145.

Review follow-up

  • One constant, COVERED_ARCHES in rocke.tests.arch_marks, replaces the per-file copies of the gfx942 and gfx950 pair.
  • The f64 MFMA probe mark states the real limit: the probe builds for gfx942 only.
  • The common LDS profile file drops its duplicate helpers.
  • test_support.py derives the 32x32 warp tile from the MMA catalog.
  • The device_info tests and three comgr tests that only changed a label run on one arch again.

Not done

  • The scan does not prove that both archs run. It reads arch names in source.
  • No gfx950 hardware run.

Summary — For AI reviewers

Change surface

30 test files, one of them new (tests/analysis/test_lds_profile_cdna_common.py). No emitter, core, helpers, instances or library/kernels file changes. The byte-identity gate is not affected.

Properties to verify

  1. Each parametrized assertion sits inside the subTest loop, so a gfx942 failure does not hide a gfx950 case.
  2. Each arch_specific call states a reason that matches the code under test.
  3. Per-arch expected values come from the arch catalog or the arch target, not from a copy of the production result.
  4. Out-of-scope archs (gfx1151, gfx1250, gfx90a, gfx1201) are unchanged.

Where to look first

  1. gemm/test_fp16_rcr.py: per-arch MFMA intrinsic table.
  2. gemm/test_split_k_wgrad.py: per-arch default group counts.
  3. tuning/test_tuning_template.py: the _toy_arch marker.
  4. tools/test_arch_domain_artifact.py: ARCH class attribute and *Gfx950Test subclasses.

🤖 Generated with Claude Code

CongMa13 and others added 3 commits November 3, 2026 16:05
…-2822)

Parametrize the gemm dispatch tests over gfx942 and gfx950, with per-arch
expected values where the archs differ. Mark the split-K planner, the
split-K depth test and the bf16 decode capability test arch_specific:
their cost model and candidates exist for gfx950 only.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…g dispatch tests (AICK-2822)

Parametrize the core, build, binding and norm tests over both archs. Mark
the arch-bound moe tests, the moe example parity test (the example spec is
invalid on gfx942) and the toy tuning family arch_specific with a reason.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…and numeric tests (AICK-2822)

Parametrize the comgr, device-info, arch-domain artifact, LDS registry and
b32 LDS profile tests over both archs. Mark the LDS profile tests whose
bank behavior differs, and the tf32 and f64 MFMA numeric tests,
arch_specific with a reason.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@therock-pr-bot

therock-pr-bot Bot commented Nov 3, 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

therock-pr-bot Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

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

CongMa13 and others added 4 commits November 3, 2026 16:36
… (AICK-2822)

Revert the cross-arch parametrization in test_lds_profile_gfx942.py and
test_lds_profile_gfx950.py. Each file again tests only its own profile, and
every test carries arch_specific. Move the cases that both profiles share
into test_lds_profile_cdna_common.py, parametrized over gfx942 and gfx950.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ke/aick-2822-arch-dispatch-small-dirs

# Conflicts:
#	dnn-providers/hip-kernel-provider/rocke/platform/tests/numeric/test_gfx942_f64_mma_numeric.py
#	dnn-providers/hip-kernel-provider/rocke/platform/tests/numeric/test_gfx942_tf32_numeric.py
#	dnn-providers/hip-kernel-provider/rocke/platform/tests/runtime/test_device_info.py
…(AICK-2822)

Parametrize test_f64_gemm_rejects_unsupported over gfx942 and gfx950, with
per-arch refusal messages and LDS caps. Mark the fp64 pad budget test, the
moe fp8 K=128 catalog test, the gfx942 lds_swizzle numeric test and the five
dsl_probes tests that need a target without ds.read.tr16.b64 as arch_specific
with a reason.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ke/aick-2822-arch-dispatch-small-dirs

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@CongMa13
CongMa13 marked this pull request as ready for review November 5, 2026 21:08
@CongMa13
CongMa13 requested a review from a team as a code owner November 5, 2026 21:08
@cgmillette

Copy link
Copy Markdown
Contributor

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

PR #15004 — test(rocke): cover gfx942 and gfx950 in the dispatch and small platform tests (CongMa13, AICK-2822) — 🟠 First-round: arch list copies; body figure

Prior item Status
Reviews and threads 🟢 None yet
• 0 reviews, 0 threads; pr-bot policy ✓ (read)
• rocke-platform review requested (read)
Bots / CI 🟡 Red, develop's
• fails: 4 math-libs builds + summary — develop's 14976 hipCCL break (read)
• merge ref predates revert 15089; no test job ran; needs a develop merge or push
• previous head 456b6abede, same test diff: rocKE shards ran these files; gfx942 runtime tests ✓ (read)
• its only ✗: develop's fp64 doc test, fixed by 15002 (read)
• 27 ✓, 48 skipped; merge: blocked
Our checks 🟢 Pass
• merge vs 96e7c35607: clean, 88 behind (ran)
• build + ctest 51 ✓ / 1 skip; byte identity ×4 GREEN; goldens unchanged (ran)
• changed tests 499 ✓ / 36 skip; installed 28 of 30 files 388 ✓ / 37 skip, 36 device-gated (ran)
• no assertion dropped (read); 10 per-arch mutants: these tests catch 10, develop's versions 6 (ran)
• 2 tools files in no CI lane (develop's install excludes them); gfx950 cases ✓ from source (ran)
• rules 1–3 clean; body has one measured figure (N1) (ran)
Code quality 🟠 Should-fix
• one home per fact: the covered-arch pair has 13 (N2) (ran)
• LDS common file repeats the per-arch files' _access/_predict; positional LdsAccess(0, 0, 0, 4) needs neither (read)
• test_support.py:21 hand-lists an input select_largest_k gives (ran)
• label-only loops (core, comgr, device info) add runs, not coverage; the tuning marks fit (read)
# Sev file:line Finding
N1 🟠 PR body, "How this was tested" Body states a measured test run time
• impact: a squash commits the body; Compliance allows only measured ratios there (read)
• fix: say it qualitatively ("too slow for a local run"); the test counts can stay
N2 🟠 platform/tests/dispatch/dispatch_tests/core/test_core.py:48 The covered-arch pair gets 13 homes under four names
• evidence: _ARCHES, ARCHES, _CDNA_ARCHES (7 gemm files), _CDNA_TARGETS, plus 6 inline lists; the arch table's cdna family has five arches (read)
• impact: test_core.py's fixtures keep their own pair; one more arch in _ARCHES fails 2 widened tests (ran)
• fix: one public constant, e.g. COVERED_ARCHES in rocke.tests.arch_marks, imported at each site; build both _registry() fixtures from it: then passes (ran); runtime gates via current_device_arch_in
N3 🟡 platform/tests/numeric/test_gfx942_f64_mma_numeric.py:73 The f64 MFMA mark's reason is false at head
• impact: gfx950's catalog lists mfma_f64_16x16x4_f64 (develop's 14328, merged here 11-03); that atom gets no probe case (ran)
• fix: state the real limit (the probe builds for gfx942), or add gfx950 m=16 cases: they lower and compile (ran)

Utility: 🟢 Positive — widened tests catch four per-arch breaks develop's versions missed


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

First-round review: first pass by a local qwen3.6 model, verified by the orchestrator (Claude Opus 5.5). Checks: merge with develop, build + ctest, byte identity, goldens, changed tests (source and installed), per-arch mutation runs, CI logs at this and the previous head, code quality. Flags whether a closer look is needed; not an approval or rejection.

CongMa13 and others added 2 commits November 6, 2026 11:20
Add COVERED_ARCHES to rocke.tests.arch_marks and import it at each site
that listed gfx942 and gfx950. Build both core registry fixtures from it.
Derive the 32x32 warp tile from the MMA catalog. Drop the duplicate LDS
helpers in the common profile file. Remove arch loops that only change a
label in the comgr and device info tests. State the real limit in the f64
MFMA probe mark.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@CongMa13

CongMa13 commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

Addressed in ddc24d40c0a (merged with latest develop).

  • N1: The PR body now says the excluded test pair is "too slow for a local run". Test counts stay.
  • N2: COVERED_ARCHES now lives in rocke.tests.arch_marks. The 18 test files import it. Both test_core.py _registry() fixtures use it. test_lds_registry.py and test_f64_gemm_numeric.py keep their own lists because they name different arch sets.
  • N3: The f64 mark states the real limit: the probe builds for gfx942 only. No gfx950 m=16 cases added.
  • LDS common file: The duplicate _access and _predict helpers are gone.
  • test_support.py: The 32x32 warp tile comes from select_largest_k.
  • Label-only loops: The two device_info tests and three comgr tests run on one arch again. The tuning marks stay.

Tests: 499 passed, 36 skipped on the changed files after the merge. Pre-commit (black 25.12.0) passes.

@cgmillette

Copy link
Copy Markdown
Contributor

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

PR #15004 — test(rocke): cover gfx942 and gfx950 in the dispatch and small platform tests (CongMa13, AICK-2822) — 🟢 Follow-up: all three items fixed

Prior item Status
cgmillette (11-06) N1 body states a measured run time 🟢 FIXED (body edit)
• body now says "too slow for a local run" (read)
• no measured time left in the body (ran)
cgmillette (11-06) N2 covered-arch pair has 13 homes 🟢 FIXED eddc69b975
• COVERED_ARCHES in rocke.tests.arch_marks; 18 files import it (ran)
• mutated constant: every site follows, test_core fixtures too (ran)
• kept lists (LDS registry, f64 GEMM) name other arch sets (read)
cgmillette (11-06) N3 f64 MFMA mark's reason false 🟢 FIXED eddc69b975
• reason matches: the probe lowers and builds for gfx942 only (read)
• saved probe reads FIXED (ran)
Reviews and threads 🟢 None yet
• 0 reviews, 0 threads; merge blocked on review (read)
Bots / CI 🟢 Green
• attempt 1: Windows rocKE shard timed out on the Azure runner pool; attempt 2 ✓ (read)
• gfx94X shards ran the gemm runtime tests: passed (read)
• 45 ✓, 52 skipped, 1 cancelled (superseded PR-bot run) (read)
Our checks 🟢 Pass
• merge vs a9f06669a3: clean, 27 behind (ran)
• build + ctest 57 ✓ / 1 skip; byte identity ×4 GREEN; goldens unchanged (ran)
• changed tests 494 ✓ / 36 skip; installed 28 of 30 files 383 ✓ / 37 skip (ran)
• 4 COVERED_ARCHES mutants over the 18 importing files (ran)
• rules 1–3 clean; body has no figure (ran)
Code quality 🟢 Good
• one home per fact: COVERED_ARCHES, read at every site (ran)
• LDS helpers gone; test_support takes the tile from select_largest_k (read)
• comgr and device-info label loops gone; core's stay by design (read)
• nit: test_core.py:47-48 comment still describes the removed tuple (read)

Net-new: none.

Utility: 🟢 Positive — one arch constant now drives every widened test; items fixed


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

Follow-up review: first pass by qwen3.6 (local), verified by the orchestrator (Claude Opus 5.5). Checks: merge with develop, build + ctest, byte identity, goldens, changed tests (source and installed), arch-constant mutants, CI logs at this head, code quality. Flags whether a closer look is needed; not an approval or rejection.

@cgmillette
cgmillette merged commit 2152eba into develop Nov 7, 2026
169 of 172 checks passed
@cgmillette
cgmillette deleted the users/congma13/rocke/aick-2822-arch-dispatch-small-dirs branch November 7, 2026 02:35
jefyang1 added a commit that referenced this pull request Nov 7, 2026
Conflict: dispatch_tests/core/test_binding.py. develop's #15004 runs the
binding tests on every covered arch; this branch moved the binding to the
shared rocke.numeric.bf16 codec and dropped its private
_bf16_from_f32/_f32_from_bf16. The file keeps develop's arch
parametrization and this branch's codec: the reference output encodes
with f32_to_bf16, and the bf16 class checks the binding uses the shared
codec. The round-trip and nearest-even tests it replaced are in
tests/numeric/test_bf16_codec.py.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants