[HLSL] Convert the LinAlg descriptor I/O runner to the typed CPU oracle - #8752
Merged
Jack Elliott (JoeCitizen) merged 1 commit intoAug 11, 2026
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Converts descriptor load/store testing to the layout-aware typed CPU oracle.
Changes:
- Supports independent load and store layouts.
- Seeds and verifies untouched destination bytes.
- Preserves the existing packed-layout test behavior.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Jack Elliott (JoeCitizen)
force-pushed
the
linalg-hlk-descriptor-io-runner
branch
from
August 10, 2026 20:03
edf363a to
28eee76
Compare
Damyan Pepper (damyanp)
approved these changes
Aug 10, 2026
Damyan Pepper (damyanp)
left a comment
Member
There was a problem hiding this comment.
Approving, but I think that the PoisonSeed stuff is unnecessarily complicated and confusing.
runLoadStoreDescriptor predated the typed CPU oracle and used the untyped packed-buffer helpers, which can only describe a matrix that starts at offset zero and has a tightly packed stride. It carried a standing TODO to vary those. This converts it to the layout-aware oracle path, matching runCopyConvert, so a caller can describe where in the buffer the matrix actually sits. The load and store layouts are separate parameters rather than one shared layout. With a single layout the round trip cannot detect an addressing error the implementation applies consistently: the load reads Input[f(i)] and the store writes Output[f(i)], so for any bijective f the result is byte-identical to a correctly encoded buffer. Varying only the offset or only the stride does not help either, because the same f appears on both sides and cancels. Being able to load one layout and store another is what makes a layout the implementation did not honour observable. The destination is now seeded with a poison pattern and checked with verifyUntouchedBytes, so a store that places its elements correctly but also writes over the offset prologue or the inter-row padding is caught rather than silently accepted. The poison seed is a single file-scope constant instead of a value threaded through the helpers as a parameter. Every call site already passed the same constant, so the parameter advertised a generality no test used, and the parameters shared its name closely enough to shadow it. No behaviour change. LoadStoreDescriptor_Wave_16x16_F16 is still the only caller and still passes the same layout on both sides, which is the packed offset-zero case it always used. Being packed, it owns every byte of its buffer, so the new padding check is satisfied trivially and only proves the wiring; a following change adds the cases that give it something to find. Validated on WARP: 28 total, 23 passed, the same 4 pre-existing failures and 1 skip as before, so no existing outcome changed. Assisted-by: GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 83725f5d-8e98-4c1d-91ee-ad47629e007b
Jack Elliott (JoeCitizen)
force-pushed
the
linalg-hlk-descriptor-io-runner
branch
from
August 10, 2026 21:26
28eee76 to
96bef77
Compare
Damyan Pepper (damyanp)
approved these changes
Aug 10, 2026
Chris B (llvm-beanz)
approved these changes
Aug 11, 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.
runLoadStoreDescriptorused the untyped packed-buffer helpers, which can onlydescribe a matrix at offset zero with a packed stride, and carried a TODO to
vary those. This moves it to the layout-aware oracle path, matching
runCopyConvert.Load and store layouts are separate parameters: with one shared layout the round
trip cannot detect a consistently applied addressing error, since the load reads
Input[f(i)]and the store writesOutput[f(i)].No behaviour change. The one caller still passes a packed layout on both sides
and owns every byte of its buffer, so the new padding check only proves the
wiring; the next change adds the cases that exercise it.
Assisted-by: GitHub Copilot