Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions lib/SPIRV/SPIRVReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,26 +450,28 @@ Type *SPIRVToLLVM::transType(SPIRVType *T, bool UseTPT) {
Params.push_back(static_cast<SPIRVConstant *>(Use)->getZExtIntValue());
auto *CTI = MT->getComponentTypeInterpretation();
if (!CTI)
return mapType(T, getSPIRVType(internal::OpTypeJointMatrixINTEL,
transTypeToOCLTypeName(MT->getCompType()),
Params, !UseTPT));
std::string ComponentTypeName;
return mapType(
T, llvm::TargetExtType::get(*Context, "spirv.JointMatrixINTEL",
transType(MT->getCompType()), Params));
switch (static_cast<SPIRVConstant *>(CTI)->getZExtIntValue()) {
case internal::InternalJointMatrixCTI::TF32:
ComponentTypeName = "tf32";
Params.push_back(1);
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have some enum for these values?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, we do have them :) it is "internal::InternalJointMatrixCTI::"

break;
case internal::InternalJointMatrixCTI::Bfloat16:
ComponentTypeName = "bfloat16";
Params.push_back(2);
break;
case internal::InternalJointMatrixCTI::PackedInt2:
Params.push_back(3);
break;
case internal::InternalJointMatrixCTI::PackedInt4:
// Do nothing just now
Params.push_back(4);
break;
default:
llvm_unreachable("Unexpected joint matrix component type");
}
return mapType(T, getSPIRVType(internal::OpTypeJointMatrixINTEL,
ComponentTypeName, Params, !UseTPT));
return mapType(
T, llvm::TargetExtType::get(*Context, "spirv.JointMatrixINTEL",
transType(MT->getCompType()), Params));
}
case OpTypeForwardPointer: {
SPIRVTypeForwardPointer *FP =
Expand Down
301 changes: 126 additions & 175 deletions test/extensions/INTEL/SPV_INTEL_joint_matrix/joint_matrix.ll

Large diffs are not rendered by default.

358 changes: 171 additions & 187 deletions test/extensions/INTEL/SPV_INTEL_joint_matrix/joint_matrix_bfloat16.ll

Large diffs are not rendered by default.

121 changes: 0 additions & 121 deletions test/extensions/INTEL/SPV_INTEL_joint_matrix/joint_matrix_element.ll

This file was deleted.

Loading