Skip to content

Conversation

@V-FEXrt
Copy link
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
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
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
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

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.

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

4 participants