@@ -1033,7 +1033,7 @@ def SaturationModeAttr : EnumAttr<NVVM_Dialect, SaturationMode, "sat_mode"> {
1033
1033
let assemblyFormat = "`<` $value `>`";
1034
1034
}
1035
1035
1036
- def NVVM_CvtFloatToTF32Op : NVVM_Op<"cvt .float.to.tf32"> {
1036
+ def NVVM_ConvertFloatToTF32Op : NVVM_Op<"convert .float.to.tf32"> {
1037
1037
let summary = "Convert the given float input to TF32";
1038
1038
let description = [{
1039
1039
This Op converts the given f32 input to tf32.
@@ -1062,24 +1062,24 @@ def NVVM_CvtFloatToTF32Op : NVVM_Op<"cvt.float.to.tf32"> {
1062
1062
}];
1063
1063
1064
1064
string llvmBuilder = [{
1065
- auto intId = NVVM::CvtFloatToTF32Op ::getIntrinsicID($rnd, $sat, $relu);
1065
+ auto intId = NVVM::ConvertFloatToTF32Op ::getIntrinsicID($rnd, $sat, $relu);
1066
1066
$res = createIntrinsicCall(builder, intId, {$src});
1067
1067
}];
1068
1068
}
1069
1069
1070
- def CVTFP6E2M3 : I32EnumAttrCase<"E2M3", 0, "e2m3">;
1071
- def CVTFP6E3M2 : I32EnumAttrCase<"E3M2", 1, "e3m2">;
1070
+ def ConvertFP6E2M3 : I32EnumAttrCase<"E2M3", 0, "e2m3">;
1071
+ def ConvertFP6E3M2 : I32EnumAttrCase<"E3M2", 1, "e3m2">;
1072
1072
1073
- def CVTFP6Type : I32EnumAttr<"CVTFP6Type ", "NVVM CVTFP6Type kind",
1074
- [CVTFP6E2M3, CVTFP6E3M2 ]> {
1073
+ def ConvertFP6Type : I32EnumAttr<"ConvertFP6Type ", "NVVM ConvertFP6Type kind",
1074
+ [ConvertFP6E2M3, ConvertFP6E3M2 ]> {
1075
1075
let genSpecializedAttr = 0;
1076
1076
let cppNamespace = "::mlir::NVVM";
1077
1077
}
1078
- def CVTFP6TypeAttr : EnumAttr<NVVM_Dialect, CVTFP6Type , "cvt_fp6_type"> {
1078
+ def ConvertFP6TypeAttr : EnumAttr<NVVM_Dialect, ConvertFP6Type , "cvt_fp6_type"> {
1079
1079
let assemblyFormat = "`<` $value `>`";
1080
1080
}
1081
1081
1082
- def NVVM_CvtF32x2ToF6x2Op : NVVM_Op<"cvt .f32x2.to.f6x2"> {
1082
+ def NVVM_ConvertF32x2ToF6x2Op : NVVM_Op<"convert .f32x2.to.f6x2"> {
1083
1083
let summary = "Convert a pair of float inputs to f6x2";
1084
1084
let description = [{
1085
1085
This Op converts each of the given float inputs to the specified fp6 type.
@@ -1099,19 +1099,19 @@ def NVVM_CvtF32x2ToF6x2Op : NVVM_Op<"cvt.f32x2.to.f6x2"> {
1099
1099
1100
1100
let results = (outs AnyTypeOf<[I16, VectorOfLengthAndType<[2], [I8]>]>:$dst);
1101
1101
let arguments = (ins
1102
- CVTFP6TypeAttr :$type,
1102
+ ConvertFP6TypeAttr :$type,
1103
1103
F32:$a,
1104
1104
F32:$b,
1105
1105
DefaultValuedAttr<BoolAttr, "false">:$relu);
1106
1106
let assemblyFormat = "$type $a `,` $b attr-dict `:` type($dst)";
1107
1107
1108
1108
let extraClassDeclaration = [{
1109
- static llvm::Intrinsic::ID getIntrinsicID(NVVM::CVTFP6Type ,
1109
+ static llvm::Intrinsic::ID getIntrinsicID(NVVM::ConvertFP6Type ,
1110
1110
bool hasRelu);
1111
1111
}];
1112
1112
1113
1113
string llvmBuilder = [{
1114
- auto intId = NVVM::CvtF32x2ToF6x2Op ::getIntrinsicID($type, $relu);
1114
+ auto intId = NVVM::ConvertF32x2ToF6x2Op ::getIntrinsicID($type, $relu);
1115
1115
llvm::Value *packedI16 = createIntrinsicCall(builder, intId, {$a, $b});
1116
1116
if(op.getDst().getType().isInteger(16))
1117
1117
$dst = packedI16;
@@ -1121,20 +1121,20 @@ def NVVM_CvtF32x2ToF6x2Op : NVVM_Op<"cvt.f32x2.to.f6x2"> {
1121
1121
}];
1122
1122
}
1123
1123
1124
- def CVTFP8E4M3 : I32EnumAttrCase<"E4M3", 0, "e4m3">;
1125
- def CVTFP8E5M2 : I32EnumAttrCase<"E5M2", 1, "e5m2">;
1126
- def CVTFP8UE8M0 : I32EnumAttrCase<"UE8M0", 2, "ue8m0">;
1124
+ def ConvertFP8E4M3 : I32EnumAttrCase<"E4M3", 0, "e4m3">;
1125
+ def ConvertFP8E5M2 : I32EnumAttrCase<"E5M2", 1, "e5m2">;
1126
+ def ConvertFP8UE8M0 : I32EnumAttrCase<"UE8M0", 2, "ue8m0">;
1127
1127
1128
- def CVTFP8Type : I32EnumAttr<"CVTFP8Type ", "NVVM CVTFP8Type kind",
1129
- [CVTFP8E4M3, CVTFP8E5M2, CVTFP8UE8M0 ]> {
1128
+ def ConvertFP8Type : I32EnumAttr<"ConvertFP8Type ", "NVVM ConvertFP8Type kind",
1129
+ [ConvertFP8E4M3, ConvertFP8E5M2, ConvertFP8UE8M0 ]> {
1130
1130
let genSpecializedAttr = 0;
1131
1131
let cppNamespace = "::mlir::NVVM";
1132
1132
}
1133
- def CVTFP8TypeAttr : EnumAttr<NVVM_Dialect, CVTFP8Type , "cvt_fp8_type"> {
1133
+ def ConvertFP8TypeAttr : EnumAttr<NVVM_Dialect, ConvertFP8Type , "cvt_fp8_type"> {
1134
1134
let assemblyFormat = "`<` $value `>`";
1135
1135
}
1136
1136
1137
- def NVVM_CvtF32x2ToF8x2Op : NVVM_Op<"cvt .f32x2.to.f8x2"> {
1137
+ def NVVM_ConvertF32x2ToF8x2Op : NVVM_Op<"convert .f32x2.to.f8x2"> {
1138
1138
let summary = "Convert a pair of float inputs to f8x2";
1139
1139
let description = [{
1140
1140
This Op converts each of the given float inputs to the specified fp8 type.
@@ -1155,7 +1155,7 @@ def NVVM_CvtF32x2ToF8x2Op : NVVM_Op<"cvt.f32x2.to.f8x2"> {
1155
1155
let hasVerifier = 1;
1156
1156
let results = (outs AnyTypeOf<[I16, VectorOfLengthAndType<[2], [I8]>]>:$dst);
1157
1157
let arguments = (ins
1158
- CVTFP8TypeAttr :$type,
1158
+ ConvertFP8TypeAttr :$type,
1159
1159
F32:$a,
1160
1160
F32:$b,
1161
1161
DefaultValuedAttr<FPRoundingModeAttr, "FPRoundingMode::NONE">:$rnd,
@@ -1164,14 +1164,14 @@ def NVVM_CvtF32x2ToF8x2Op : NVVM_Op<"cvt.f32x2.to.f8x2"> {
1164
1164
let assemblyFormat = "$type $a `,` $b attr-dict `:` type($dst)";
1165
1165
1166
1166
let extraClassDeclaration = [{
1167
- static llvm::Intrinsic::ID getIntrinsicID(NVVM::CVTFP8Type to,
1167
+ static llvm::Intrinsic::ID getIntrinsicID(NVVM::ConvertFP8Type to,
1168
1168
NVVM::FPRoundingMode rnd,
1169
1169
NVVM::SaturationMode sat,
1170
1170
bool hasRelu);
1171
1171
}];
1172
1172
1173
1173
string llvmBuilder = [{
1174
- auto intId = NVVM::CvtF32x2ToF8x2Op ::getIntrinsicID($type, $rnd, $sat, $relu);
1174
+ auto intId = NVVM::ConvertF32x2ToF8x2Op ::getIntrinsicID($type, $rnd, $sat, $relu);
1175
1175
llvm::Value *packedI16 = createIntrinsicCall(builder, intId, {$a, $b});
1176
1176
if(op.getDst().getType().isInteger(16))
1177
1177
$dst = packedI16;
@@ -1181,7 +1181,7 @@ def NVVM_CvtF32x2ToF8x2Op : NVVM_Op<"cvt.f32x2.to.f8x2"> {
1181
1181
}];
1182
1182
}
1183
1183
1184
- def NVVM_CvtF16x2ToF8x2Op : NVVM_Op<"cvt .f16x2.to.f8x2"> {
1184
+ def NVVM_ConvertF16x2ToF8x2Op : NVVM_Op<"convert .f16x2.to.f8x2"> {
1185
1185
let summary = "Convert an f16x2 input to f8x2";
1186
1186
let description = [{
1187
1187
This Op converts the given f16 inputs in an f16x2 vector to the specified
@@ -1203,18 +1203,18 @@ def NVVM_CvtF16x2ToF8x2Op : NVVM_Op<"cvt.f16x2.to.f8x2"> {
1203
1203
let hasVerifier = 1;
1204
1204
let results = (outs AnyTypeOf<[I16, VectorOfLengthAndType<[2], [I8]>]>:$dst);
1205
1205
let arguments = (ins
1206
- CVTFP8TypeAttr :$type,
1206
+ ConvertFP8TypeAttr :$type,
1207
1207
VectorOfLengthAndType<[2], [F16]>:$a,
1208
1208
DefaultValuedAttr<BoolAttr, "false">:$relu);
1209
1209
let assemblyFormat = "$type $a attr-dict `:` type($a) `->` type($dst)";
1210
1210
1211
1211
let extraClassDeclaration = [{
1212
- static llvm::Intrinsic::ID getIntrinsicID(NVVM::CVTFP8Type to,
1212
+ static llvm::Intrinsic::ID getIntrinsicID(NVVM::ConvertFP8Type to,
1213
1213
bool hasRelu);
1214
1214
}];
1215
1215
1216
1216
string llvmBuilder = [{
1217
- auto intId = NVVM::CvtF16x2ToF8x2Op ::getIntrinsicID($type, $relu);
1217
+ auto intId = NVVM::ConvertF16x2ToF8x2Op ::getIntrinsicID($type, $relu);
1218
1218
llvm::Value *packedI16 = createIntrinsicCall(builder, intId, {$a});
1219
1219
if(op.getDst().getType().isInteger(16))
1220
1220
$dst = packedI16;
@@ -1224,7 +1224,7 @@ def NVVM_CvtF16x2ToF8x2Op : NVVM_Op<"cvt.f16x2.to.f8x2"> {
1224
1224
}];
1225
1225
}
1226
1226
1227
- def NVVM_CvtBF16x2ToF8x2Op : NVVM_Op<"cvt .bf16x2.to.f8x2"> {
1227
+ def NVVM_ConvertBF16x2ToF8x2Op : NVVM_Op<"convert .bf16x2.to.f8x2"> {
1228
1228
let summary = "Convert a pair of bf16 inputs to f8x2";
1229
1229
let description = [{
1230
1230
This Op converts the given bf16 inputs in a bf16x2 vector to the specified
@@ -1246,7 +1246,7 @@ def NVVM_CvtBF16x2ToF8x2Op : NVVM_Op<"cvt.bf16x2.to.f8x2"> {
1246
1246
let hasVerifier = 1;
1247
1247
let results = (outs AnyTypeOf<[I16, VectorOfLengthAndType<[2], [I8]>]>:$dst);
1248
1248
let arguments = (ins
1249
- CVTFP8TypeAttr :$type,
1249
+ ConvertFP8TypeAttr :$type,
1250
1250
VectorOfLengthAndType<[2], [BF16]>:$a,
1251
1251
DefaultValuedAttr<FPRoundingModeAttr, "FPRoundingMode::NONE">:$rnd,
1252
1252
DefaultValuedAttr<SaturationModeAttr, "SaturationMode::NONE">:$sat);
@@ -1258,7 +1258,7 @@ def NVVM_CvtBF16x2ToF8x2Op : NVVM_Op<"cvt.bf16x2.to.f8x2"> {
1258
1258
}];
1259
1259
1260
1260
string llvmBuilder = [{
1261
- auto intId = NVVM::CvtBF16x2ToF8x2Op ::getIntrinsicID($rnd, $sat);
1261
+ auto intId = NVVM::ConvertBF16x2ToF8x2Op ::getIntrinsicID($rnd, $sat);
1262
1262
llvm::Value *packedI16 = createIntrinsicCall(builder, intId, {$a});
1263
1263
if(op.getDst().getType().isInteger(16))
1264
1264
$dst = packedI16;
0 commit comments