Skip to content

Commit 93b82c0

Browse files
committed
AMDGPU: Support intrinsic selection for gfx1250 wmma instructions
Remove unnecessary Feature and Predicates
1 parent 480f358 commit 93b82c0

File tree

3 files changed

+2
-19
lines changed

3 files changed

+2
-19
lines changed

llvm/lib/Target/AMDGPU/AMDGPU.td

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -844,12 +844,6 @@ def FeatureCvtFP8VOP1Bug : SubtargetFeature<"cvt-fp8-vop1-bug",
844844
[FeatureFP8ConversionInsts]
845845
>;
846846

847-
def FeatureWMMA128bInsts : SubtargetFeature<"wmma-128b-insts",
848-
"HasWMMA128bInsts",
849-
"true",
850-
"Has WMMA instructions where A and B matrices do not have duplicated data"
851-
>;
852-
853847
def FeaturePkFmacF16Inst : SubtargetFeature<"pk-fmac-f16-inst",
854848
"HasPkFmacF16Inst",
855849
"true",
@@ -1931,7 +1925,6 @@ def FeatureISAVersion12 : FeatureSet<
19311925
FeatureImageInsts,
19321926
FeatureExtendedImageInsts,
19331927
FeatureFP8ConversionInsts,
1934-
FeatureWMMA128bInsts,
19351928
FeatureIEEEMinimumMaximumInsts,
19361929
FeaturePackedTID,
19371930
FeatureVcmpxPermlaneHazard,
@@ -2298,10 +2291,6 @@ def isGFX11Plus :
22982291
Predicate<"Subtarget->getGeneration() >= AMDGPUSubtarget::GFX11">,
22992292
AssemblerPredicate<(all_of FeatureGFX11Insts)>;
23002293

2301-
def isGFX11PlusNot12_50 :
2302-
Predicate<"Subtarget->getGeneration() >= AMDGPUSubtarget::GFX11 && !Subtarget->hasGFX1250Insts()">,
2303-
AssemblerPredicate<(all_of FeatureGFX11Insts, (not FeatureGFX1250Insts))>;
2304-
23052294
def isGFX12Only :
23062295
Predicate<"Subtarget->getGeneration() == AMDGPUSubtarget::GFX12">,
23072296
AssemblerPredicate<(all_of FeatureGFX12Insts)>;
@@ -2627,9 +2616,6 @@ def HasFP8Insts : Predicate<"Subtarget->hasFP8Insts()">,
26272616
def HasFP8ConversionInsts : Predicate<"Subtarget->hasFP8ConversionInsts()">,
26282617
AssemblerPredicate<(all_of FeatureFP8ConversionInsts)>;
26292618

2630-
def HasWMMA128bInsts : Predicate<"Subtarget->hasWMMA128bInsts()">,
2631-
AssemblerPredicate<(all_of FeatureWMMA128bInsts)>;
2632-
26332619
def HasFP8E5M3Insts : Predicate<"Subtarget->hasFP8E5M3Insts()">,
26342620
AssemblerPredicate<(all_of FeatureFP8E5M3Insts)>;
26352621

llvm/lib/Target/AMDGPU/GCNSubtarget.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ class GCNSubtarget final : public AMDGPUGenSubtargetInfo,
165165
bool HasMAIInsts = false;
166166
bool HasFP8Insts = false;
167167
bool HasFP8ConversionInsts = false;
168-
bool HasWMMA128bInsts = false;
169168
bool HasFP8E5M3Insts = false;
170169
bool HasCvtFP8Vop1Bug = false;
171170
bool HasPkFmacF16Inst = false;
@@ -865,8 +864,6 @@ class GCNSubtarget final : public AMDGPUGenSubtargetInfo,
865864

866865
bool hasFP8ConversionInsts() const { return HasFP8ConversionInsts; }
867866

868-
bool hasWMMA128bInsts() const { return HasWMMA128bInsts; }
869-
870867
bool hasFP8E5M3Insts() const { return HasFP8E5M3Insts; }
871868

872869
bool hasPkFmacF16Inst() const {

llvm/lib/Target/AMDGPU/VOP3PInstructions.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1774,7 +1774,7 @@ class SWMMACPat_w64<Instruction Inst, SDPatternOperator node, VOP3PWMMA_Profile
17741774
let WaveSizePredicate = isWave64;
17751775
}
17761776

1777-
let WaveSizePredicate = isWave32, SubtargetPredicate = isGFX11PlusNot12_50, OtherPredicates = [HasWMMA128bInsts] in {
1777+
let WaveSizePredicate = isWave32, SubtargetPredicate = isGFX12PlusNot12_50 in {
17781778
defm : WMMAPat<"V_WMMA_F32_16X16X16_F16_w32", int_amdgcn_wmma_f32_16x16x16_f16, F32_F16_WMMA_w32>;
17791779
defm : WMMAPat<"V_WMMA_F32_16X16X16_BF16_w32", int_amdgcn_wmma_f32_16x16x16_bf16, F32_BF16_WMMA_w32>;
17801780
defm : WMMAPat<"V_WMMA_F16_16X16X16_F16_w32", int_amdgcn_wmma_f16_16x16x16_f16, F16_F16_WMMA_w32,1>;
@@ -1801,7 +1801,7 @@ let WaveSizePredicate = isWave32, SubtargetPredicate = isGFX11PlusNot12_50, Othe
18011801
def : SWMMACPat<V_SWMMAC_F32_16X16X32_BF8_BF8_w32_twoaddr, int_amdgcn_swmmac_f32_16x16x32_bf8_bf8, F32_FP8BF8_SWMMAC_w32>;
18021802
}
18031803

1804-
let WaveSizePredicate = isWave64, SubtargetPredicate = isGFX11PlusNot12_50, OtherPredicates = [HasWMMA128bInsts] in {
1804+
let WaveSizePredicate = isWave64, SubtargetPredicate = isGFX12PlusNot12_50 in {
18051805
defm : WMMAPat<"V_WMMA_F32_16X16X16_F16_w64", int_amdgcn_wmma_f32_16x16x16_f16, F32_F16_WMMA_w64>;
18061806
defm : WMMAPat<"V_WMMA_F32_16X16X16_BF16_w64", int_amdgcn_wmma_f32_16x16x16_bf16, F32_BF16_WMMA_w64>;
18071807
defm : WMMAPat<"V_WMMA_F16_16X16X16_F16_w64", int_amdgcn_wmma_f16_16x16x16_f16, F16_F16_WMMA_w64,1>;

0 commit comments

Comments
 (0)