Skip to content

[SM6.10] LinAlg Validation: MatVecMul MatVecMulAdd - #8718

Open
V-FEXrt wants to merge 2 commits into
microsoft:mainfrom
V-FEXrt:linalg-matvecmul
Open

[SM6.10] LinAlg Validation: MatVecMul MatVecMulAdd#8718
V-FEXrt wants to merge 2 commits into
microsoft:mainfrom
V-FEXrt:linalg-matvecmul

Conversation

@V-FEXrt

@V-FEXrt V-FEXrt commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Fixes #8503
Fixes #8504

Adds validation rules for MatVecMul and MatVecMulAdd DXIL operations

Copilot AI review requested due to automatic review settings July 30, 2026 18:04

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 SM 6.10 validation for DXIL matrix-vector multiply operations.

Changes:

  • Validates matrix scope/use, dimensions, component interpretation, signed floating-point outputs, and bias compatibility.
  • Adds focused validation tests and updates shader-stage fixtures.
  • Registers and documents new diagnostics.

Reviewed changes

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

Show a summary per file
File Description
utils/hct/hctdb.py Registers validation rules.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-vs.ll Updates vertex-stage fixture.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-raytracing.ll Updates ray-tracing fixtures.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-ps.ll Updates pixel-stage fixture.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-node.ll Updates node-stage fixture.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-ms.ll Updates mesh-stage fixture.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-matvecmuladd.ll Tests invalid multiply-add operations.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-matvecmul.ll Tests invalid multiply operations.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-hs.ll Updates hull-stage fixture.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-gs.ll Updates geometry-stage fixture.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-ds.ll Updates domain-stage fixture.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-cs.ll Updates compute-stage fixture.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-as.ll Updates amplification-stage fixture.
tools/clang/test/CodeGenDXIL/hlsl/linalg/builtins/matrixvectormultiplyadd/nominal.hlsl Makes multiply-add codegen cases valid.
tools/clang/test/CodeGenDXIL/hlsl/linalg/builtins/matrixvectormultiply/nominal.hlsl Makes multiply codegen cases valid.
lib/DxilValidation/DxilValidationUtils.h Declares type formatting utility.
lib/DxilValidation/DxilValidationUtils.cpp Implements type formatting utility.
lib/DxilValidation/DxilValidation.cpp Implements operation validation.
docs/DXIL.rst Documents diagnostics.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/DxilValidation/DxilValidation.cpp Outdated
Comment thread lib/DxilValidation/DxilValidation.cpp
Copilot AI review requested due to automatic review settings July 31, 2026 22:47

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 20 out of 20 changed files in this pull request and generated no new comments.

Suppressed comments (1)

lib/DxilValidation/DxilValidation.cpp:1147

  • For packed interpretations this value is the required physical vector length, not the matrix K dimension. For example, the new C21M4N8 test reports K dimension '2' even though its metadata declares K=8. This makes the diagnostic factually incorrect; either report both K and the packed vector length or rename the message to describe the required vector size.
        CI, ValidationRule::InstrLinAlgMatrixDimVectorMismatch,
        {"Input", std::to_string(InputVecTy->getNumElements()), "K",
         std::to_string(K)});

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: MatVecMulAdd LinAlg Validation: MatVecMul

2 participants