@@ -616,21 +616,6 @@ SPIRVType *LLVMToSPIRVBase::transPointerType(Type *ET, unsigned AddrSpc) {
616
616
transType (ET)));
617
617
}
618
618
} else {
619
- // JointMatrixINTEL type is not necessarily an opaque type, it can be
620
- // represented as a structure with pointer to a multidimensional array
621
- // member.
622
- if (ST && ST->hasName ()) {
623
- StringRef STName = ST->getName ();
624
- if (STName.startswith (kSPIRVTypeName ::PrefixAndDelim)) {
625
- SmallVector<std::string, 8 > Postfixes;
626
- auto TN = decodeSPIRVTypeName (STName, Postfixes);
627
- if (TN == kSPIRVTypeName ::JointMatrixINTEL) {
628
- SPIRVType *TranslatedTy = transSPIRVJointMatrixINTELType (Postfixes);
629
- PointeeTypeMap[TypeKey] = TranslatedTy;
630
- return TranslatedTy;
631
- }
632
- }
633
- }
634
619
SPIRVType *ElementType = transType (ET);
635
620
// ET, as a recursive type, may contain exactly the same pointer T, so it
636
621
// may happen that after translation of ET we already have translated T,
@@ -661,66 +646,6 @@ SPIRVType *LLVMToSPIRVBase::transPointerType(SPIRVType *ET, unsigned AddrSpc) {
661
646
return TranslatedTy;
662
647
}
663
648
664
- // Representation in LLVM IR before the translator is a pointer to an opaque
665
- // structure:
666
- // %spirv.JointMatrixINTEL._%element_type%_%rows%_%cols%_%layout%_%scope%_%use%
667
- // Here we check the structure name yet again. Another option would be to
668
- // check SPIR-V friendly function calls (by their name) and obtain return
669
- // or their parameter types, assuming, that the appropriate types are Matrix
670
- // structure type. But in the near future, we will reuse Composite
671
- // instructions to do, for example, matrix initialization directly on AMX
672
- // register by OpCompositeConstruct. And we can't claim, that the Result type
673
- // of OpCompositeConstruct instruction is always the joint matrix type, it's
674
- // simply not true.
675
- SPIRVType *LLVMToSPIRVBase::transSPIRVJointMatrixINTELType (
676
- SmallVector<std::string, 8 > Postfixes) {
677
- auto ParseInteger = [this ](StringRef Postfix) -> ConstantInt * {
678
- unsigned long long N = 0 ;
679
- if (consumeUnsignedInteger (Postfix, 10 , N))
680
- BM->getErrorLog ().checkError (
681
- false , SPIRVEC_InvalidLlvmModule,
682
- " TypeJointMatrixINTEL expects integer parameters" );
683
- return getUInt32 (M, N);
684
- };
685
- std::vector<SPIRVValue *> Args;
686
- for (size_t I = 1 ; I != Postfixes.size (); ++I)
687
- Args.emplace_back (transConstant (ParseInteger (Postfixes[I])));
688
-
689
- Type *ElemTy = nullptr ;
690
- StringRef Ty{Postfixes[0 ]};
691
- auto NumBits = llvm::StringSwitch<unsigned >(Ty)
692
- .Case (" char" , 8 )
693
- .Case (" short" , 16 )
694
- .Case (" int" , 32 )
695
- .Case (" long" , 64 )
696
- .Default (0 );
697
- if (NumBits) {
698
- ElemTy = IntegerType::get (M->getContext (), NumBits);
699
- } else if (Ty == " half" ) {
700
- ElemTy = Type::getHalfTy (M->getContext ());
701
- } else if (Ty == " float" ) {
702
- ElemTy = Type::getFloatTy (M->getContext ());
703
- } else if (Ty == " double" ) {
704
- ElemTy = Type::getDoubleTy (M->getContext ());
705
- } else if (Ty == " bfloat16" ) {
706
- ElemTy = Type::getInt16Ty (M->getContext ());
707
- // TODO: add BF16 CTI when we do breaking change
708
- // auto *CTI = transConstant(getUInt32(M, static_cast<uint64_t>(
709
- // internal::InternalJointMatrixCTI::Bfloat16)));
710
- // Args.push_back(CTI);
711
- // BM->addCapability(internal::CapabilityJointMatrixBF16ComponentTypeINTEL);
712
- } else if (Ty == " tf32" ) {
713
- ElemTy = Type::getFloatTy (M->getContext ());
714
- auto *CTI = transConstant (getUInt32 (
715
- M, static_cast <uint64_t >(internal::InternalJointMatrixCTI::TF32)));
716
- Args.push_back (CTI);
717
- BM->addCapability (internal::CapabilityJointMatrixTF32ComponentTypeINTEL);
718
- } else {
719
- llvm_unreachable (" Unexpected type for matrix!" );
720
- }
721
- return BM->addJointMatrixINTELType (transType (ElemTy), Args);
722
- }
723
-
724
649
SPIRVType *LLVMToSPIRVBase::transSPIRVOpaqueType (StringRef STName,
725
650
unsigned AddrSpace) {
726
651
std::pair<StringRef, unsigned > Key = {STName, AddrSpace};
@@ -777,8 +702,6 @@ SPIRVType *LLVMToSPIRVBase::transSPIRVOpaqueType(StringRef STName,
777
702
return SaveType (BM->addQueueType ());
778
703
else if (TN == kSPIRVTypeName ::PipeStorage)
779
704
return SaveType (BM->addPipeStorageType ());
780
- else if (TN == kSPIRVTypeName ::JointMatrixINTEL)
781
- return SaveType (transSPIRVJointMatrixINTELType (Postfixes));
782
705
else if (BM->isAllowedToUseExtension (ExtensionID::SPV_INTEL_vector_compute) &&
783
706
TN == kSPIRVTypeName ::BufferSurfaceINTEL) {
784
707
auto Access = getAccessQualifier (STName);
0 commit comments