Skip to content

[Backport to 17] Reverse translation of access + load/store operations for cooperative matrix (#2165)#3621

Closed
obrotowy wants to merge 1 commit intoKhronosGroup:llvm_release_170from
obrotowy:llvm_release_170
Closed

[Backport to 17] Reverse translation of access + load/store operations for cooperative matrix (#2165)#3621
obrotowy wants to merge 1 commit intoKhronosGroup:llvm_release_170from
obrotowy:llvm_release_170

Conversation

@obrotowy
Copy link

@obrotowy obrotowy commented Mar 4, 2026

Implement translation via SPIR-V friendly calls, as:

the LLVM instructions are not capable to accept target extension types;
cooperative matrix is an opaque object and accessing elements is implementation defined, hence we can't use GEP to which AccessChain naturally maps, since GEP has a different meaning.
As for now some BE would need to recognize and define what to do with a call to __spirv_AccessChain(matrix, index). Better option is to map such SPIR-V to an intrinsic or define an appropriate type in LLVM (hence defining rules for GEP and other instructions) , but it's off the table now.

…s for cooperative matrix (KhronosGroup#2165)

Implement translation via SPIR-V friendly calls, as:

the LLVM instructions are not capable to accept target extension types;
cooperative matrix is an opaque object and accessing elements is implementation defined, hence we can't use GEP to which AccessChain naturally maps, since GEP has a different meaning.
As for now some BE would need to recognize and define what to do with a call to __spirv_AccessChain(matrix, index). Better option is to map such SPIR-V to an intrinsic or define an appropriate type in LLVM (hence defining rules for GEP and other instructions) , but it's off the table now.
@obrotowy obrotowy changed the title [Backport to 15] Reverse translation of access + load/store operations for cooperative matrix (#2165) [Backport to 17] Reverse translation of access + load/store operations for cooperative matrix (#2165) Mar 4, 2026
@obrotowy obrotowy closed this Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants