Skip to content

[SM6.10] Add HLSL MatrixRef type and lower CreateMatrix intrinsic#8040

Closed
V-FEXrt wants to merge 1 commit intomainfrom
linalg-staging-pr
Closed

[SM6.10] Add HLSL MatrixRef type and lower CreateMatrix intrinsic#8040
V-FEXrt wants to merge 1 commit intomainfrom
linalg-staging-pr

Conversation

@V-FEXrt
Copy link
Copy Markdown
Collaborator

@V-FEXrt V-FEXrt commented Jan 6, 2026

  • Adds the __builtin_LinAlg_MatrixRef type to HLSL
  • implements the first stage of __builtin_LinAlg_CreateMatrix which currently returns an unannotated MatrixRef.
  • updates HLSL intrinsics to operate over __builtin_LinAlg_MatrixRef
  • Adds the appropriate tests

Notes:

  • Annotation is intentionally ignored in this change and will be managed seperately
  • The PR couldn't be split further because __builtin_LinAlg_CreateMatrix was needed for any effective test of __builtin_LinAlg_MatrixRef

Copy link
Copy Markdown
Member

@hekota hekota left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Comment on lines +5 to +9
// AST: |-CXXRecordDecl {{[^ ]+}} <<invalid sloc>> <invalid sloc> implicit referenced class __builtin_LinAlg_MatrixRef definition
// AST-NEXT: | |-FinalAttr {{[^ ]+}} <<invalid sloc>> Implicit final
// AST-NEXT: | |-AvailabilityAttr {{[^ ]+}} <<invalid sloc>> Implicit 6.10 0 0 ""
// AST-NEXT: | |-HLSLMatrixRefAttr {{[^ ]+}} <<invalid sloc>> Implicit
// AST-NEXT: | |-FieldDecl {{[^ ]+}} <<invalid sloc>> <invalid sloc> implicit h 'int'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// AST: |-CXXRecordDecl {{[^ ]+}} <<invalid sloc>> <invalid sloc> implicit referenced class __builtin_LinAlg_MatrixRef definition
// AST-NEXT: | |-FinalAttr {{[^ ]+}} <<invalid sloc>> Implicit final
// AST-NEXT: | |-AvailabilityAttr {{[^ ]+}} <<invalid sloc>> Implicit 6.10 0 0 ""
// AST-NEXT: | |-HLSLMatrixRefAttr {{[^ ]+}} <<invalid sloc>> Implicit
// AST-NEXT: | |-FieldDecl {{[^ ]+}} <<invalid sloc>> <invalid sloc> implicit h 'int'
// AST: CXXRecordDecl {{.*}} implicit referenced class __builtin_LinAlg_MatrixRef definition
// AST-NEXT: FinalAttr {{.*}} Implicit final
// AST-NEXT: AvailabilityAttr {{.*}} Implicit 6.10 0 0 ""
// AST-NEXT: HLSLMatrixRefAttr {{.*}} Implicit
// AST-NEXT: FieldDecl {{.*}} implicit h 'int'

Just a nit - consider simplifying the checks for better readability.

Copy link
Copy Markdown
Collaborator

@spall spall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks okay to me but I'm not confident enough in this area to approve

@V-FEXrt
Copy link
Copy Markdown
Collaborator Author

V-FEXrt commented Jan 30, 2026

This PR is defunct under the latest spec changes.

@V-FEXrt V-FEXrt closed this Jan 30, 2026
@github-project-automation github-project-automation Bot moved this from New to Done in HLSL Roadmap Jan 30, 2026
@V-FEXrt V-FEXrt deleted the linalg-staging-pr branch February 4, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Enable creation of a LinAlg Matrix (type, intrinsic, dxil op)

3 participants