Skip to content

test(hipblaslt): self-test that the checks of D report a solution that never launches - #14647

Merged
jinchen62 merged 4 commits into
developfrom
users/jinchen62/rocm-32357-bench-reset-d
Oct 31, 2026
Merged

jinchen62 merged 4 commits into
developfrom
users/jinchen62/rocm-32357-bench-reset-d

Conversation

@jinchen62

@jinchen62 jinchen62 commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

JIRA ID : ROCM-32357

Motivation

hipblaslt-bench and hipblaslt-test share one test harness, testing_matmul.hpp. It can run several solutions (kernel configurations) for one matrix multiply and compare each result, the output matrix D, with a CPU reference. All solutions write into the same D buffer, so a solution that never stored D used to be checked against the previous solution's result and pass. On gfx942 before #12797, hipblaslt-bench --algo_method all -v passed three hand-written CustomGSUs_* kernels this way. #14743 now fills D with a NaN sentinel before each solution, but no test fails if that fill stops working.

Technical Details

  • A new test argument, skip_launch_solution, leaves the solution at that position in the list unlaunched (C interface with strided batches only), so that solution never writes D. After each solution's check, the harness fails the case if the allclose check reported a solution other than the unlaunched one or missed the unlaunched one, and also if the unlaunched solution was never checked.
  • The new per-PR (pre_checkin) case matmul_check_reports_unlaunched_solution sets it for f32 and bf16 at 131×67×200, in the hipblaslt-test loop and in the bench's loop over candidate solutions (timing: 1). It uses allclose alone because unit_check and norm_check fail a case outright when D holds NaN. Cases with timing: 1 now get a _TIMING name suffix.
  • Only test code changes; the library, its kernels and the clients' behavior without the new argument do not. Arguments, the clients' parameter struct, gains one int32_t field, added at the same position in hipblaslt_common.yaml, from which hipblaslt_gtest.data is generated at build time.
  • This branch first carried its own fill of D. fix(hipblaslt): reset D before each verified solution in the bench #14743 landed an equivalent fill on develop, and the merge of develop keeps develop's fillDWithSentinel, so this pull request now adds only the self-test.

Test Plan

On MI300X (gfx942), with hipBLASLt built from this branch after the merge of develop and HIPBLASLT_LIBLOGIC_PATH limited to six logic files: fp8 × fp16 → f16, f16 → f32, grouped GEMM, aux output, and the f32 and bf16 N/T grid-based files cut to the 8 solutions nearest 131×67×200.

  • matmul_check_reports_unlaunched_solution with develop's fill and with the fill disabled, plus the existing fast_check_inject self-test.
  • Every solution with -v, to check that the fill passes correct kernels: fp8 × fp16 at 4096×16×8192 with --verify_strict, --c_equal_d, --rotating 256 with timed iterations, --api_method mix and --HMM; f16 → f32 at 4096×16×2048 with the C and C++ interfaces; f16 → f32 with pointer-array batches; grouped GEMM; aux output.

Test Result

Case Fill disabled Develop's fill
matmul_check_reports_unlaunched_solution, 4 cases 4 fail: "solution 1 of 4 … was never launched, but D passed its checks" 4 pass, 134 ms in total
  • With every solution launched, every check passes with develop's fill: 53 fp8 × fp16 solutions in each bench configuration (--verify_strict exits 0), 39 f16 → f32 solutions with each interface, 37 with pointer-array batches, and the single grouped-GEMM and aux-output solutions. The fast_check_inject self-test passes.
  • On the head before the merge, all four new cases ran and passed in TheRock's gfx942 and gfx110X hipBLASLt lanes.
  • Automated GitHub checks for the merged head are pending.

Not addressed here

  • Under unit_check and norm_check, the harness still does not reset E (the aux output), the bias gradient or amaxD between solutions; only fast_check fills them. ROCM-33792 tracks this.

Submission Checklist

jinchen62 and others added 2 commits October 29, 2026 11:36
…client

hipblaslt-bench -v launches every candidate solution into the same D and checks
each one in turn, and so does the hipblaslt-test loop outside fast_check, but D
was only restored between solutions under --c_equal_d. A solution that never
stores D was therefore checked against the previous solution's result and
reported that solution's error. On gfx942 before #12797, three CustomGSUs
split-K kernels (indices 57 to 59) passed --algo_method all -v with the
1.8065e-05 norm_error of the generated solution checked before them, and failed
with norm_error 1 when run alone.

Fill D with all ones, NaN in the IEEE floating types, before each solution is
launched whenever a result check is on and D is not C: in the candidate-search
prepare hook and in the hipblaslt-test loop. fast_check keeps its own sentinel,
and --c_equal_d keeps restoring C from the host.

JIRA ID: ROCM-32357

Co-authored-by: Cursor <cursoragent@cursor.com>
…t never launches

Add skip_launch_solution, a test argument that leaves one solution in the list
unlaunched, and a pre_checkin case that sets it for f32 and bf16 in the
hipblaslt-test loop and in the hipblaslt-bench candidate search (timing 1).
The case passes only if the allclose check reports that solution and no other,
so it fails if a solution is again checked against the previous solution's D.
It uses allclose alone because unit_check and norm_check fail a case outright
on the NaN that the skipped solution leaves in D.

Test names of cases that run the candidate search now end in _TIMING.

JIRA ID: ROCM-32357

Co-authored-by: Cursor <cursoragent@cursor.com>
@jinchen62
jinchen62 requested a review from a team as a code owner October 29, 2026 11:38
@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.

@codecov

codecov Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

❌ Your project status has failed because the head coverage (68.40%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #14647      +/-   ##
===========================================
- Coverage    77.35%   77.29%   -0.07%     
===========================================
  Files         2894     2893       -1     
  Lines       487162   486074    -1088     
  Branches     73731    73490     -241     
===========================================
- Hits        376823   375663    -1160     
- Misses       85448    85637     +189     
+ Partials     24891    24774     -117     
Flag Coverage Δ *Carryforward flag
TensileLite-CPP 50.82% <ø> (-0.14%) ⬇️ Carriedforward from 59d192a
TensileLite-Unit 84.14% <ø> (+0.11%) ⬆️ Carriedforward from 59d192a
hipBLAS 90.62% <ø> (ø) Carriedforward from 59d192a
hipBLASLt 68.40% <ø> (-0.19%) ⬇️
hipCUB 82.68% <ø> (ø) Carriedforward from 59d192a
hipDNN 86.92% <ø> (-0.05%) ⬇️ Carriedforward from 59d192a
hipFFT 38.02% <ø> (-4.64%) ⬇️ Carriedforward from 59d192a
hipRAND 76.12% <ø> (ø) Carriedforward from 59d192a
hipSOLVER 69.67% <ø> (ø) Carriedforward from 59d192a
hipSPARSE 87.03% <ø> (ø) Carriedforward from 59d192a
rocBLAS 68.95% <ø> (-0.24%) ⬇️ Carriedforward from 59d192a
rocFFT 47.34% <ø> (+0.11%) ⬆️ Carriedforward from 59d192a
rocRAND 57.31% <ø> (-0.01%) ⬇️ Carriedforward from 59d192a
rocSOLVER 76.74% <ø> (ø) Carriedforward from 59d192a
rocSPARSE 83.54% <ø> (-<0.01%) ⬇️ Carriedforward from 59d192a
rocThrust 93.15% <ø> (ø) Carriedforward from 59d192a

*This pull request uses carry forward flags. Click here to find out more.
see 161 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tony-davis tony-davis 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.

Hi Jinchen, this looks good to me, and thanks for the really clear write-up! I like that the self-test goes red with the fill disabled (your table shows all 4 cases failing), and I checked that all four matmul_check_reports_unlaunched_solution cases actually ran and passed (not skipped) in TheRock's gfx942 and gfx110X hipBLASLt lanes. I also walked the bench path. The fill happens in prepare, before the first cold launch that the check copies back, and it lands outside both the skip-slow warm-up timer and the timed loop, so I don't think it moves any timing numbers. A couple of non-blocking thoughts:

  • I bet the nightly comprehensive tier, which checks a lot more multi-solution cases than standard, may turn up a few newly red cases where a kernel skips its D store. That's the fix doing its job, but it's probably worth a heads-up to whoever watches nightly.
  • Tiny nit: "all ones" in the title reads like the value 1.0 (which a skipped solution could match when alpha=0, beta=1 and C is all ones). The code fills all-ones bytes, NaN in the IEEE types, so there's no real problem. "all-ones bytes" in the title would just match the description and keep the squash commit unambiguous.

jinchen62 and others added 2 commits October 31, 2026 08:44
…-reset-d

#14743 landed the same fill of D on develop. Resolve the conflicts in
testing_matmul.hpp to develop's fillDWithSentinel, and keep the
skip_launch_solution self-test, including after #14025's relaunch check.

Co-authored-by: Cursor <cursoragent@cursor.com>
The fill of D that the self-test checks now comes from fillDWithSentinel:
the fast_check NaN sentinel, with all-ones bytes for D types the sentinel
does not cover.

JIRA ID: ROCM-32357

Co-authored-by: Cursor <cursoragent@cursor.com>
@jinchen62 jinchen62 changed the title fix(hipblaslt): fill D with all ones before checking each solution in the matmul client test(hipblaslt): self-test that the checks of D report a solution that never launches Oct 31, 2026
@jinchen62

jinchen62 commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks Tony. While merging develop I found #14743, which landed an equivalent fill of D on develop (fillDWithSentinel: the fast_check NaN sentinel, with all-ones bytes as the fallback). I resolved the conflicts to develop's version, so this PR now adds only the skip_launch_solution self-test. The four matmul_check_reports_unlaunched_solution cases pass with develop's fill and all fail with it disabled, and every solution in the -v bench runs still passes on the merged build.

  • Title: now test(hipblaslt): self-test that the checks of D report a solution that never launches, so the squash commit no longer mentions "all ones".
  • Nightly: the fill now comes from fix(hipblaslt): reset D before each verified solution in the bench #14743, so the comprehensive tier picks it up from develop regardless of this PR. Any newly red multi-solution cases there are kernels that skip their D store.
  • E, the bias gradient and amaxD: ROCM-33792, in the thread on testing_matmul.hpp.

@jinchen62
jinchen62 enabled auto-merge (squash) October 31, 2026 08:57
@jinchen62
jinchen62 merged commit d5c3ba8 into develop Oct 31, 2026
130 of 133 checks passed
@jinchen62
jinchen62 deleted the users/jinchen62/rocm-32357-bench-reset-d branch October 31, 2026 11:18
@assistant-librarian

Copy link
Copy Markdown
Contributor

TheRock Submodule Bump Activity

Newest first

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