Skip to content

Comments

Reverse translation of access + load/store operations for cooperative matrix#2165

Merged
MrSidims merged 2 commits intoKhronosGroup:mainfrom
vmaksimo:martix-load-store-reverse
Oct 4, 2023
Merged

Reverse translation of access + load/store operations for cooperative matrix#2165
MrSidims merged 2 commits intoKhronosGroup:mainfrom
vmaksimo:martix-load-store-reverse

Conversation

@vmaksimo
Copy link
Contributor

@vmaksimo vmaksimo commented Sep 27, 2023

Implement translation via SPIR-V friendly calls, as:

  1. the LLVM instructions are not capable to accept target extension types;
  2. 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.

@vmaksimo vmaksimo changed the title Enable reverse translation of access/store operations for cooperative… Reverse translation of access/store operations for cooperative matrix Sep 27, 2023
@vmaksimo
Copy link
Contributor Author

Please take a look @MrSidims @asudarsa @LU-JOHN

@MrSidims
Copy link
Contributor

Same comment about justification, GEP not only can't work with target ext types, but also make a little sense in terms of accessing an element of a slice of a matrix owned by the current WI - which is purely implementation defined thing.

@MrSidims MrSidims changed the title Reverse translation of access/store operations for cooperative matrix Reverse translation of access + load/store operations for cooperative matrix Oct 2, 2023
@MrSidims MrSidims requested a review from svenvh October 2, 2023 18:58
@MrSidims MrSidims merged commit deb6ee9 into KhronosGroup:main Oct 4, 2023
vmaksimo added a commit to vmaksimo/SPIRV-LLVM-Translator that referenced this pull request Oct 4, 2023
… 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.
MrSidims pushed a commit that referenced this pull request Oct 9, 2023
… matrix (#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.
MrSidims pushed a commit to MrSidims/SPIRV-LLVM-Translator that referenced this pull request Mar 25, 2025
…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.
MrSidims pushed a commit to MrSidims/SPIRV-LLVM-Translator that referenced this pull request Mar 25, 2025
…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.
MrSidims pushed a commit to MrSidims/SPIRV-LLVM-Translator that referenced this pull request Mar 25, 2025
…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.

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
MrSidims pushed a commit to MrSidims/SPIRV-LLVM-Translator that referenced this pull request Mar 25, 2025
…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.
MrSidims pushed a commit to MrSidims/SPIRV-LLVM-Translator that referenced this pull request Mar 25, 2025
…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.
MrSidims pushed a commit that referenced this pull request Mar 28, 2025
…s for cooperative matrix (#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.
MrSidims pushed a commit to MrSidims/SPIRV-LLVM-Translator that referenced this pull request Mar 31, 2025
…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.
MrSidims pushed a commit to MrSidims/SPIRV-LLVM-Translator that referenced this pull request May 11, 2025
…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.

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
MrSidims pushed a commit to MrSidims/SPIRV-LLVM-Translator that referenced this pull request Aug 6, 2025
…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.

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants