Skip to content

Conversation

@hekota
Copy link
Member

@hekota hekota commented Feb 4, 2026

Adds codegen for Attributed LinAlgMatrix types. Each type is translated into its corresponding DXIL type %dx.types.LinAlgMatrix<mangling> where <mangling> encodes the matrix attributes.

For example this type:

__builtin_LinAlgMatrix [[__LinAlgMatrix_Attributes(ComponentType::I32, 4, 5, MatrixUse::B, MatrixScope::ThreadGroup)]]

Will be traslated to %dx.types.LinAlgMatrixC4M4N5U1S2.

Also adds !dx.targetTypes metadata node that lists all LinAlgMatrix types that were ever used in the module. For the example above that would be:

!dx.targetTypes = !{!1}
!1 ! = = !{%dx.types.LinAlgMatrixC4M4N5U1S2 undef, i32 4, i32 4, i32 5, i32 1, i32 2}

Later after optimizations these metadata nodes should be pruned to contain only the types actually used in the module (task #8133).

Fixes #8123
Fixes #8127

@hekota hekota marked this pull request as ready for review February 4, 2026 01:47
@hekota hekota changed the title Codegen for attributed LinAlg Matrix types [SM6.10] Codegen for attributed LinAlg Matrix types Feb 4, 2026
@hekota hekota requested a review from llvm-beanz February 4, 2026 01:56
@hekota hekota linked an issue Feb 4, 2026 that may be closed by this pull request
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.

CodeGen for attributed matrix handles

1 participant