Skip to content

Implement Matrix LoadFromDescriptor Builtin #7902

Closed

Description

Create __builtin_LinAlg_MatrixLoadFromDescriptor(MatrixRef, Handle, int Offset, int Stride, int Layout) and lower it to dx.op.matrixLoadFromDescriptor as specified in https://github.com/microsoft/hlsl-specs/blob/main/proposals/0035-linalg-matrix.md

Changes required:

  • If necessary, update the intrinsic definition in utils/hct/gen_intrin_main.txt
  • In lib/HLSL/HLOperationLower.cpp
    • Create a new lowering function TranslateLinAlgMatrixLoadFromDescriptor
    • Update the mapping table for IOP___builtin_LinAlg_MatrixLoadFromDescriptor from EmptyLower to TranslateLinAlgMatrixLoadFromDescriptor
  • Write frontend tests in tools/clang/test/SemaHLSL/hlsl/linalg/builtins/matrixloadfromdescriptor
  • Update frontend tests in tools/clang/test/SemaHLSL/hlsl/linalg/builtins
  • If necessary, update the opcode definition in utils/hct/hctdb.py (be sure to check allowed stages)
  • Update codegen tests in tools/clang/test/CodeGenDXIL/hlsl/linalg/builtins
  • For complex ops, write codegen tests in tools/clang/test/CodeGenDXIL/hlsl/linalg/builtins/matrixloadfromdescriptor

Note: The spec is not final therefore this issue may fall out of date. The spec is the source of truth and should be referenced during implementation.

Activity

  1. moved this from Ready to Active in HLSL Supporton Jan 6, 2026
  2. V-FEXrt commented on Jan 9, 2026

    @V-FEXrt
    CollaboratorAuthor

    This is implemented in the linalg-staging branch

  3. V-FEXrt commented on Feb 2, 2026

    @V-FEXrt
    CollaboratorAuthor

    Reimplemented in my new linalg-staging-v branch, but blocked from actually merging until annotations can be properly spelled out

  4. added a commit that references this issue on Mar 4, 2026
    bf5bf68
  5. moved this from Active to Closed in HLSL Supporton Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions