Skip to content

Linalg vali matrixstoretodescriptor - #8771

Open
Ashley Coleman (V-FEXrt) wants to merge 4 commits into
microsoft:mainfrom
V-FEXrt:linalg-vali-matrixstoretodescriptor
Open

Linalg vali matrixstoretodescriptor#8771
Ashley Coleman (V-FEXrt) wants to merge 4 commits into
microsoft:mainfrom
V-FEXrt:linalg-vali-matrixstoretodescriptor

Conversation

@V-FEXrt

Copy link
Copy Markdown
Collaborator

Fixes #8497

Implements validation rules for MatrixStoreToDescriptor

Copilot AI balanced review requested due to automatic review settings August 13, 2026 01:01
@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

✅ With the latest revision this PR passed the C/C++ code formatter.

Copilot AI 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.

Pull request overview

Adds DXIL validation rules for LinAlgMatrixStoreToDescriptor.

Changes:

  • Validates layout, matrix scope, UAV resource type, and alignment.
  • Adds diagnostics and negative validation tests.
  • Updates existing fixtures to use valid layout and alignment values.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
utils/hct/hctdb.py Adds the layout validation rule.
lib/DxilValidation/DxilValidation.cpp Implements descriptor-store validation.
docs/DXIL.rst Documents the new diagnostic.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-matrixstoretodescriptor.ll Tests invalid operands and matrix scope.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-vs.ll Uses valid store arguments.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-ps.ll Uses valid store arguments.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-cs.ll Uses valid store arguments.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-hs.ll Uses valid store arguments.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-ds.ll Uses valid store arguments.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-gs.ll Uses valid store arguments.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-ms.ll Uses valid store arguments.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-as.ll Uses valid store arguments.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-node.ll Uses valid store arguments.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-raytracing.ll Updates ray-tracing fixtures.
tools/clang/test/CodeGenDXIL/hlsl/linalg/builtins/matrixstoretodescriptor/nominal.hlsl Updates nominal alignment expectations.
Suppressed comments (1)

lib/DxilValidation/DxilValidation.cpp:1188

  • The nonconstant Align rejection is also untested: current cases cover zero and a non-multiple only. Add a runtime i32 alignment case and verify the immediate-constant diagnostic so this branch cannot regress.
  } else
    ValCtx.EmitInstrFormatError(CI, ValidationRule::InstrOpConst,
                                {"Align", "LinAlgMatrixStoreToDescriptor"});

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread lib/DxilValidation/DxilValidation.cpp
Comment thread lib/DxilValidation/DxilValidation.cpp
Copilot AI review requested due to automatic review settings August 13, 2026 01:08

Copilot AI 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.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated no new comments.

Suppressed comments (2)

lib/DxilValidation/DxilValidation.cpp:1131

  • This adds user-visible validation behavior for experimental Shader Model 6.10. Please add a single-sentence entry under ### Upcoming Preview Release in docs/ReleaseNotes.md, as required for significant compiler behavior changes by CONTRIBUTING.md.
  ValidateLinAlgOpParameters(CI, ValCtx);

tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-matrixstoretodescriptor.ll:28

  • This case uses an SRV RawBuffer, so it exercises only the UAV-class half of the new resource check; it would still pass if the RawBuffer-kind check were removed. Add a second case using a UAV of a non-RawBuffer kind (for example, a typed or structured UAV) and verify the same diagnostic.
  %6 = call %dx.types.Handle @dx.op.annotateHandle(i32 216, %dx.types.Handle %2, %dx.types.ResourceProperties { i32 11, i32 0 })  ; AnnotateHandle(res,props)  resource: ByteAddressBuffer
  call void @dx.op.linAlgMatrixStoreToDescriptor.mC8M4N4U0S1(i32 -2147483628, %dx.types.LinAlgMatrixC8M4N4U0S1 %4, %dx.types.Handle %6, i32 0, i32 0, i32 0, i32 128)  ; LinAlgMatrixStoreToDescriptor(matrix,handle,offset,stride,layout,align)

Copilot AI review requested due to automatic review settings August 13, 2026 01:22

Copilot AI 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.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated no new comments.

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.

LinAlg Validation: MatrixStoreToDescriptor

3 participants