[HLSL] Test both B layouts in Wave MMA - #8912
Open
Jack Elliott (JoeCitizen) wants to merge 4 commits into
Open
Jack Elliott (JoeCitizen) wants to merge 4 commits into
Jack Elliott (JoeCitizen) wants to merge 4 commits into
Conversation
Add one 16x16x16 F16-to-F32 Wave MMA fixture using runtime-loaded identity A, a non-symmetric B containing exact integers 1 through 256, and a zero accumulator. Exercise RowMajor and ColumnMajor encodings of the same B through the existing arithmetic runner and exact capability gates. Check the descriptor store against the independent CPU multiplication oracle. Separately check every native result accessor visit against that CPU result and atomically retain per-cell visited and wrong-value flags. Missing cells, invalid coordinates and a wrong duplicate owner cannot be hidden by a correct store or another correct visit. Iterate each lane's actual Length in a uniform maximum-length loop; exhausted and zero-length lanes contribute no status. Preserve the existing x=row coordinate rule. The fixture is independently derived from public proposal 0035; it does not fix compiler/runtime behaviour or require a release note. This is a local implementation checkpoint with AI-assisted rationale awaiting human review, not approval for publication. Assisted-by: GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 83725f5d-8e98-4c1d-91ee-ad47629e007b
Move the result descriptor store after the integrity accessor loop. This inspects the direct arithmetic-produced accumulator before a store lowering can materialise or repack it and potentially mask an accessor defect. The CHECK_RESULT_ACCESS=0 path still stores the arithmetic result directly. This tightens fixture sequencing, not compiler/runtime behaviour, and does not claim that masking has been observed on WARP. This local AI-assisted rationale awaits human review and is not approval for publication. Assisted-by: GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 83725f5d-8e98-4c1d-91ee-ad47629e007b
Compare each native F32 accessor value's integer bits with the independent CPU-expected bytes instead of a fast floating comparison. This avoids nnan assumptions weakening detection of a corrupted NaN visit. Preserve numeric equality for both signs of zero by comparing their magnitudes. Keep direct post-MMA access before the descriptor store, the existing sticky per-cell flags, finite inputs and all capability gates unchanged. This is detector hardening, not a claim of an observed NaN IHV defect. The local AI-assisted rationale awaits human review before publication. Assisted-by: GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 83725f5d-8e98-4c1d-91ee-ad47629e007b
Keep the RowMajor and ColumnMajor B cases and their independent CPU product comparison. Remove the optional native-result accessor path, expected/status resources, traversal and host status checks, and rename the fixture to describe its layout-only scope. Post-MMA accessor coverage is deliberately deferred. Existing arithmetic cases retain their default RowMajor layout and capability gates. This test-only scope cut and its AI-assisted rationale await human review. Assisted-by: GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d48ff7e3-e976-4c12-92fd-e039126a8243
Jack Elliott (JoeCitizen)
marked this pull request as ready for review
September 11, 2026 23:03
Copilot started reviewing on behalf of
Jack Elliott (JoeCitizen)
September 11, 2026 23:03
View session
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The layout is consistently applied to shader arguments, buffer encoding, validation, and execution.
Pull request overview
Adds Wave MMA execution coverage for both B matrix layouts using identity A and asymmetric B data.
Changes:
- Parameterizes B layout in matrix multiply helpers.
- Tests row-major and column-major B layouts against the CPU oracle.
File summaries
| File | Description |
|---|---|
tools/clang/unittests/HLSLExec/LinAlgTests.cpp |
Adds B-layout handling and Wave MMA coverage. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Chris B (llvm-beanz)
approved these changes
Sep 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Exercise RowMajor and ColumnMajor B in F16-to-F32 Wave MMA using an identity A
and asymmetric B.
Refs #7841.
Assisted-by: GitHub Copilot