Skip to content

[HLSL] Add typed LinAlg CPU matrix oracle#8666

Draft
JoeCitizen wants to merge 3 commits into
microsoft:mainfrom
JoeCitizen:linalg-hlk-typed-cpu-oracle
Draft

[HLSL] Add typed LinAlg CPU matrix oracle#8666
JoeCitizen wants to merge 3 commits into
microsoft:mainfrom
JoeCitizen:linalg-hlk-typed-cpu-oracle

Conversation

@JoeCitizen

Copy link
Copy Markdown
Collaborator

Summary

  • add typed F16, F32, I32 and U32 logical matrix data with safe byte encoding and decoding
  • map rectangular matrices into row-major or column-major buffers with explicit offsets and padded byte strides
  • classify matrix expectations as exact encoded bits, a finite set of complete permitted results, or excluded; excluded cases cannot become a success fallback
  • report the component type, comparison mode, rule, candidate, index, coordinate, actual value and expected value on failure
  • migrate the existing CopyConvert execution helper onto the independent CPU input/transpose oracle

The oracle in this PR is intentionally matrix-valued. Future descriptor OOB store/accumulate coverage must extend it with whole-destination-buffer candidates rather than treating untouched bytes as part of a matrix result.

Validation

  • built the Release ExecHLSLTests target
  • passed the non-Kits LinAlgCPUOracleTests::TypedMatrixBufferRoundTrip host test, including independent raw-byte goldens for all four types, both memory layouts, offsets, padding, transpose and whole-result candidate semantics
  • passed all three existing CopyConvert methods on WARP 1.65535.20-preview with D3D12 Agility SDK 1.721.2-preview and ExperimentalShaders=*
  • clang-format 17.0.1 and git diff --check pass

No physical GPU or HLK lab execution is claimed. No new LinAlg operation or component-type runtime coverage is added; CopyConvert is the representative migration only.

Stack

This draft is stacked on PR #8665, which is stacked on PR #8662. Until those ancestors land, this diff contains their commits as well. The typed-oracle change itself is commit 58fec81cc.

Refs #7841
Refs #8649
Refs #8546

Assisted-by: GitHub Copilot

Jack Elliott and others added 3 commits July 23, 2026 14:52
Use the shared MatrixUse parameter for the OuterProduct result and set it to Accumulator, matching proposal 0035 and the public dx::linalg API. Add a host-side invariant to prevent the legacy A-use declaration from returning.

Assisted-by: GitHub Copilot

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 83725f5d-8e98-4c1d-91ee-ad47629e007b
Create SRV buffers without UAV flags and transition them for both pixel and non-pixel shader access. Use a direct resource-initialization list so the graphics-only pixel state is legal.

Assisted-by: GitHub Copilot

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 83725f5d-8e98-4c1d-91ee-ad47629e007b
Add typed F16, F32, I32, and U32 matrix data with safe byte encoding, rectangular row/column-major storage mapping, and explicit exact, permitted-result, or excluded comparison policy. Cover offsets and padded strides with independent host goldens, and migrate the existing CopyConvert tests onto the oracle.

Assisted-by: GitHub Copilot

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 83725f5d-8e98-4c1d-91ee-ad47629e007b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

1 participant