Skip to content

Add support for SPV_INTEL_joint_matrix extension#1165

Merged
AlexeySotkin merged 5 commits intoKhronosGroup:masterfrom
AlexeySotkin:SPV_INTEL_joint_matrix
Aug 26, 2021
Merged

Add support for SPV_INTEL_joint_matrix extension#1165
AlexeySotkin merged 5 commits intoKhronosGroup:masterfrom
AlexeySotkin:SPV_INTEL_joint_matrix

Conversation

@AlexeySotkin
Copy link
Contributor

The spec is available at intel/llvm#4373

Comment on lines 317 to 321
if (size_t Space = ElemType.rfind(' '))
ElemType = ElemType.substr(Space + 1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if there are no space? In which cases you expect the condition to return false?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is ok if there is no space. This if handles cases when we have type modifier, like in the example signed char. In this case we take only last word "char". If there is no space it means that there is no modifiers and ElemType already holds the name of the type we want.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that if there is no space, rfind returns npos, which evaluates to true, which means that ElemType will be overwritten (I assume with an empty string)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Thanks. Fixed in ae98a40

Clean up SPIRVRegularizeLLVMBase::adaptStructTypes method
Add clarifying comments

Signed-off-by: Alexey Sotkin <alexey.sotkin@intel.com>
@AlexeySotkin AlexeySotkin force-pushed the SPV_INTEL_joint_matrix branch from 3bb8d93 to e549d01 Compare August 25, 2021 12:36
Signed-off-by: Alexey Sotkin <alexey.sotkin@intel.com>
Signed-off-by: Alexey Sotkin <alexey.sotkin@intel.com>
Signed-off-by: Alexey Sotkin <alexey.sotkin@intel.com>
@AlexeySotkin AlexeySotkin merged commit 44f6f57 into KhronosGroup:master Aug 26, 2021
Quetzonarch pushed a commit to Quetzonarch/SPIRV-LLVM-Translator that referenced this pull request Aug 27, 2021
The spec is available at intel/llvm#4373

Signed-off-by: Alexey Sotkin <alexey.sotkin@intel.com>
Quetzonarch pushed a commit to Quetzonarch/SPIRV-LLVM-Translator that referenced this pull request Jul 13, 2022
The spec is available at intel/llvm#4373

Signed-off-by: Alexey Sotkin <alexey.sotkin@intel.com>
vmaksimo pushed a commit to vmaksimo/SPIRV-LLVM-Translator that referenced this pull request Sep 1, 2022
…sion (KhronosGroup#1165) 'master' -> 'xmain-web' (#4)

  CONFLICT (content): Merge conflict in lib/SPIRV/libSPIRV/spirv_internal.hpp
  CONFLICT (content): Merge conflict in lib/SPIRV/libSPIRV/SPIRVType.h
  CONFLICT (content): Merge conflict in lib/SPIRV/libSPIRV/SPIRVType.cpp
  CONFLICT (content): Merge conflict in lib/SPIRV/libSPIRV/SPIRVOpCodeEnumInternal.h
  CONFLICT (content): Merge conflict in lib/SPIRV/libSPIRV/SPIRVOpCode.h
  CONFLICT (content): Merge conflict in lib/SPIRV/libSPIRV/SPIRVModule.h
  CONFLICT (content): Merge conflict in lib/SPIRV/libSPIRV/SPIRVModule.cpp
  CONFLICT (content): Merge conflict in lib/SPIRV/libSPIRV/SPIRVInstruction.h
  CONFLICT (content): Merge conflict in lib/SPIRV/SPIRVWriter.cpp
  CONFLICT (content): Merge conflict in lib/SPIRV/SPIRVUtil.cpp
  CONFLICT (content): Merge conflict in lib/SPIRV/SPIRVRegularizeLLVM.cpp
  CONFLICT (content): Merge conflict in lib/SPIRV/SPIRVReader.cpp
  CONFLICT (content): Merge conflict in lib/SPIRV/SPIRVInternal.h
  CONFLICT (content): Merge conflict in lib/SPIRV/CMakeLists.txt
  CONFLICT (content): Merge conflict in include/LLVMSPIRVExtensions.inc

  commit 44f6f57
  Author: Alexey Sotkin <alexey.sotkin@intel.com>
  Date:   Fri Aug 27 01:03:49 2021 +0300

      Add support for SPV_INTEL_joint_matrix extension (KhronosGroup#1165)

      The spec is available at intel/llvm#4373

      Signed-off-by: Alexey Sotkin <alexey.sotkin@intel.com>

Change-Id: I2c5762d4f94578b4c806086eea30592cacf603fe
vmaksimo pushed a commit to vmaksimo/SPIRV-LLVM-Translator that referenced this pull request Sep 1, 2022
extension (KhronosGroup#1165) 'master' -> 'xmain-web' (#4)

  CONFLICT (content): Merge conflict in
lib/SPIRV/libSPIRV/spirv_internal.hpp
  CONFLICT (content): Merge conflict in lib/SPIRV/libSPIRV/SPIRVType.h
  CONFLICT (content): Merge conflict in lib/SPIRV/libSPIRV/SPIRVType.cpp
  CONFLICT (content): Merge conflict in
lib/SPIRV/libSPIRV/SPIRVOpCodeEnumInternal.h
  CONFLICT (content): Merge conflict in lib/SPIRV/libSPIRV/SPIRVOpCode.h
  CONFLICT (content): Merge conflict in lib/SPIRV/libSPIRV/SPIRVModule.h
  CONFLICT (content): Merge conflict in
lib/SPIRV/libSPIRV/SPIRVModule.cpp
  CONFLICT (content): Merge conflict in
lib/SPIRV/libSPIRV/SPIRVInstruction.h
  CONFLICT (content): Merge conflict in lib/SPIRV/SPIRVWriter.cpp
  CONFLICT (content): Merge conflict in lib/SPIRV/SPIRVUtil.cpp
  CONFLICT (content): Merge conflict in
lib/SPIRV/SPIRVRegularizeLLVM.cpp
  CONFLICT (content): Merge conflict in lib/SPIRV/SPIRVReader.cpp
  CONFLICT (content): Merge conflict in lib/SPIRV/SPIRVInternal.h
  CONFLICT (content): Merge conflict in lib/SPIRV/CMakeLists.txt
  CONFLICT (content): Merge conflict in include/LLVMSPIRVExtensions.inc

  commit 44f6f57
  Author: Alexey Sotkin <alexey.sotkin@intel.com>
  Date:   Fri Aug 27 01:03:49 2021 +0300

      Add support for SPV_INTEL_joint_matrix extension (KhronosGroup#1165)

      The spec is available at intel/llvm#4373

      Signed-off-by: Alexey Sotkin <alexey.sotkin@intel.com>

Change-Id: I5c904a6d8b27d98d6850ed291060986095b9b9e6
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