Skip to content

[HLSL] Correct LinAlg OuterProduct accumulator use#8662

Draft
JoeCitizen wants to merge 1 commit into
microsoft:mainfrom
JoeCitizen:linalg-hlk-outerproduct-accumulator
Draft

[HLSL] Correct LinAlg OuterProduct accumulator use#8662
JoeCitizen wants to merge 1 commit into
microsoft:mainfrom
JoeCitizen:linalg-hlk-outerproduct-accumulator

Conversation

@JoeCitizen

@JoeCitizen JoeCitizen commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Declare the OuterProduct result with the shared USE parameter instead of the legacy hard-coded A use.
  • Set the host parameters to MatrixUse::Accumulator, matching proposal 0035 and <dx/linalg.h>.
  • Assert the accumulator-use invariant in the host runner.

This is a narrow baseline correction; it does not add new shapes, types, scopes, or capability handling.

Validation

  • clang-format 17.0.1 and git diff --check pass.
  • ExecHLSLTests builds successfully.
  • Standalone DXIL inspection changes the matrix type from LinAlgMatrixC8M16N16U0S0 to LinAlgMatrixC8M16N16U2S0; OuterProduct and descriptor accumulation consistently use the accumulator type.
  • The focused TAEF test executed end-to-end against preview D3D12 headers, Agility 1.721.2-preview, and WARP 1.65535.20-preview: 1 passed, 0 failed, 0 skipped. The exact value-4 readback oracle passed.
  • The currently published preview WARP has the known ConvertLinearAlgebraMatrix compute-command-list bug documented in [SM6.10][Exec][Bugfix] Add matrix layout conversion helpers, add post-dispatch callback, and re-enable OuterProduct test #8606: recording the conversion on a compute list poisons Close() with E_FAIL. For local validation only, the main ShaderOp command list was temporarily changed to DIRECT, which the API specification permits. No queue workaround is included in this PR. Unchanged upstream/main@2fab3f175 and this branch fail identically on the affected compute-list runtime; this branch passes on the documented DIRECT-list workaround.

Refs #7841
Refs #8563
Refs #8561

Assisted-by: GitHub Copilot

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
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