Skip to content

Commit 8d5a6d3

Browse files
YuriPlyakhinpszymich
authored andcommitted
Removed irrelevant lit test
Removed irrelevant lit test
1 parent a068489 commit 8d5a6d3

File tree

3 files changed

+24
-7
lines changed

3 files changed

+24
-7
lines changed

IGC/AdaptorOCL/SPIRV/SPIRVReader.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4110,7 +4110,15 @@ SPIRVToLLVM::transValueWithoutDecoration(SPIRVValue *BV, Function *F,
41104110
FunctionType *builtinTy = FunctionType::get(RetTy, ArgTys, false);
41114111

41124112
auto BI = static_cast<SPIRVInstruction *>(BV);
4113-
std::string builtinName(getSPIRVBuiltinName(BV->getOpCode(), BI, ArgTys, ""));
4113+
4114+
// Create suffix to distinguish different MAD signatures in the form of MxNxK_RetType_AType
4115+
std::string madSuffix = "_" + std::to_string(sizeM) + "x" +
4116+
std::to_string(sizeN) + "x" +
4117+
std::to_string(sizeK) + "_" +
4118+
ResMatTy->getMangledElemType() + "_" +
4119+
MatATy->getMangledElemType();
4120+
4121+
std::string builtinName(getSPIRVBuiltinName(BV->getOpCode(), BI, ArgTys, madSuffix));
41144122
Function *Func = cast<Function>(M->getOrInsertFunction(builtinName, builtinTy));
41154123

41164124
std::vector<Value *> Args = {

IGC/AdaptorOCL/SPIRV/libSPIRV/SPIRVType.cpp

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,19 @@ bool SPIRVTypeJointMatrixINTEL::isComponentTypeInterpretationParameterPresent()
399399
return getOpCode() == OpTypeJointMatrixINTEL && Args.size() > 4;
400400
}
401401

402+
std::string SPIRVTypeJointMatrixINTEL::getMangledElemType() const
403+
{
404+
std::string type;
405+
406+
if (ElemType->isTypeFloat())
407+
type += "f";
408+
else
409+
type += "i";
410+
type += std::to_string(ElemType->getBitWidth());
411+
412+
return std::move(type);
413+
}
414+
402415
std::string SPIRVTypeJointMatrixINTEL::getMangledName() const {
403416
std::string name;
404417
if (isUseParameterPresent()) {
@@ -432,12 +445,7 @@ std::string SPIRVTypeJointMatrixINTEL::getMangledName() const {
432445
name += std::to_string(getColumns());
433446
name += "_";
434447

435-
if (ElemType->isTypeFloat()) {
436-
name += "f";
437-
} else {
438-
name += "i";
439-
}
440-
name += std::to_string(ElemType->getBitWidth());
448+
name += getMangledElemType();
441449
return std::move(name);
442450
}
443451
}

IGC/AdaptorOCL/SPIRV/libSPIRV/SPIRVType.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,7 @@ class SPIRVTypeJointMatrixINTEL : public SPIRVType {
718718
unsigned getUse() const;
719719
unsigned getComponentTypeInterpretation() const;
720720

721+
std::string getMangledElemType() const;
721722
std::string getMangledName() const;
722723
bool isLayoutParameterPresent() const;
723724
bool isUseParameterPresent() const;

0 commit comments

Comments
 (0)