Skip to content

Commit b67d8c7

Browse files
committed
[MLIR] Add f6E3M2FN type (#105573).
`f6E3M2FN` type is proposed in [OpenCompute MX Specification](https://www.opencompute.org/documents/ocp-microscaling-formats-mx-v1-0-spec-final-pdf). It defines a 6-bit floating point number with bit layout S1E3M2. Unlike IEEE-754 types, there are no infinity or NaN values. ```c f6E3M2FN - Exponent bias: 3 - Maximum stored exponent value: 7 (binary 111) - Maximum unbiased exponent value: 7 - 3 = 4 - Minimum stored exponent value: 1 (binary 001) - Minimum unbiased exponent value: 1 − 3 = −2 - Has Positive and Negative zero - Doesn't have infinity - Doesn't have NaNs Additional details: - Zeros (+/-): S.000.00 - Max normal number: S.111.11 = ±2^(4) x (1 + 0.75) = ±28 - Min normal number: S.001.00 = ±2^(-2) = ±0.25 - Max subnormal number: S.000.11 = ±2^(-2) x 0.75 = ±0.1875 - Min subnormal number: S.000.01 = ±2^(-2) x 0.25 = ±0.0625 ``` Related PRs: - [PR-94735](#94735) [APFloat] Add APFloat support for FP6 data types - [PR-97118](#97118) [MLIR] Add f8E4M3 type - was used as a template for this PR
1 parent a105877 commit b67d8c7

File tree

25 files changed

+137
-5
lines changed

25 files changed

+137
-5
lines changed

llvm/unittests/ADT/APFloatTest.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -2084,8 +2084,14 @@ TEST(APFloatTest, getSmallestNormalized) {
20842084
EXPECT_FALSE(test.isDenormal());
20852085
EXPECT_TRUE(test.bitwiseIsEqual(expected));
20862086
EXPECT_TRUE(test.isSmallestNormalized());
2087+
20872088
test = APFloat::getSmallestNormalized(APFloat::Float6E3M2FN(), false);
20882089
expected = APFloat(APFloat::Float6E3M2FN(), "0x1p-2");
2090+
EXPECT_FALSE(test.isNegative());
2091+
EXPECT_TRUE(test.isFiniteNonZero());
2092+
EXPECT_FALSE(test.isDenormal());
2093+
EXPECT_TRUE(test.bitwiseIsEqual(expected));
2094+
EXPECT_TRUE(test.isSmallestNormalized());
20892095

20902096
test = APFloat::getSmallestNormalized(APFloat::Float4E2M1FN(), false);
20912097
expected = APFloat(APFloat::Float4E2M1FN(), "0x1p0");

mlir/include/mlir-c/BuiltinTypes.h

+10
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,16 @@ MLIR_CAPI_EXPORTED bool mlirTypeIsAFloat8E3M4(MlirType type);
149149
/// context.
150150
MLIR_CAPI_EXPORTED MlirType mlirFloat8E3M4TypeGet(MlirContext ctx);
151151

152+
/// Returns the typeID of an Float6E3M2FN type.
153+
MLIR_CAPI_EXPORTED MlirTypeID mlirFloat6E3M2FNTypeGetTypeID(void);
154+
155+
/// Checks whether the given type is an f6E3M2FN type.
156+
MLIR_CAPI_EXPORTED bool mlirTypeIsAFloat6E3M2FN(MlirType type);
157+
158+
/// Creates an f8E3M2FN type in the given context. The type is owned by the
159+
/// context.
160+
MLIR_CAPI_EXPORTED MlirType mlirFloat6E3M2FNTypeGet(MlirContext ctx);
161+
152162
/// Returns the typeID of an BFloat16 type.
153163
MLIR_CAPI_EXPORTED MlirTypeID mlirBFloat16TypeGetTypeID(void);
154164

mlir/include/mlir/IR/Builders.h

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ class Builder {
6767
FloatType getFloat8E4M3FNUZType();
6868
FloatType getFloat8E4M3B11FNUZType();
6969
FloatType getFloat8E3M4Type();
70+
FloatType getFloat6E3M2FNType();
7071
FloatType getBF16Type();
7172
FloatType getF16Type();
7273
FloatType getTF32Type();

mlir/include/mlir/IR/BuiltinTypes.h

+8-3
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ class FloatType : public Type {
6767
static FloatType getFloat8E4M3FNUZ(MLIRContext *ctx);
6868
static FloatType getFloat8E4M3B11FNUZ(MLIRContext *ctx);
6969
static FloatType getFloat8E3M4(MLIRContext *ctx);
70+
static FloatType getFloat6E3M2FN(MLIRContext *ctx);
7071

7172
/// Methods for support type inquiry through isa, cast, and dyn_cast.
7273
static bool classof(Type type);
@@ -415,9 +416,9 @@ inline bool BaseMemRefType::isValidElementType(Type type) {
415416
inline bool FloatType::classof(Type type) {
416417
return llvm::isa<Float8E5M2Type, Float8E4M3Type, Float8E4M3FNType,
417418
Float8E5M2FNUZType, Float8E4M3FNUZType,
418-
Float8E4M3B11FNUZType, Float8E3M4Type, BFloat16Type,
419-
Float16Type, FloatTF32Type, Float32Type, Float64Type,
420-
Float80Type, Float128Type>(type);
419+
Float8E4M3B11FNUZType, Float8E3M4Type, Float6E3M2FNType,
420+
BFloat16Type, Float16Type, FloatTF32Type, Float32Type,
421+
Float64Type, Float80Type, Float128Type>(type);
421422
}
422423

423424
inline FloatType FloatType::getFloat8E5M2(MLIRContext *ctx) {
@@ -448,6 +449,10 @@ inline FloatType FloatType::getFloat8E3M4(MLIRContext *ctx) {
448449
return Float8E3M4Type::get(ctx);
449450
}
450451

452+
inline FloatType FloatType::getFloat6E3M2FN(MLIRContext *ctx) {
453+
return Float6E3M2FNType::get(ctx);
454+
}
455+
451456
inline FloatType FloatType::getBF16(MLIRContext *ctx) {
452457
return BFloat16Type::get(ctx);
453458
}

mlir/include/mlir/IR/BuiltinTypes.td

+18
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,24 @@ def Builtin_Float8E3M4 : Builtin_FloatType<"Float8E3M4", "f8E3M4"> {
233233
}];
234234
}
235235

236+
//===----------------------------------------------------------------------===//
237+
// Float6E3M2FNType
238+
239+
def Builtin_Float6E3M2FN : Builtin_FloatType<"Float6E3M2FN", "f6E3M2FN"> {
240+
let summary = "6-bit floating point with 3 bits exponent and 2 bit mantissa";
241+
let description = [{
242+
An 6-bit floating point type with 1 sign bit, 3 bits exponent and 2 bits
243+
mantissa. This is not a standard type as defined by IEEE-754, but it
244+
follows similar conventions with the following characteristics:
245+
246+
* bit encoding: S1E3M2
247+
* exponent bias: 3
248+
* infinities: Not supported
249+
* NaNs: Not supported
250+
* denormals when exponent is 0
251+
}];
252+
}
253+
236254
//===----------------------------------------------------------------------===//
237255
// BFloat16Type
238256

mlir/include/mlir/IR/CommonTypeConstraints.td

+2
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,8 @@ def F8E5M2FNUZ : Type<CPred<"$_self.isFloat8E5M2FNUZ()">, "f8E5M2FNUZ type">,
344344
BuildableType<"$_builder.getFloat8E5M2FNUZType()">;
345345
def F8E3M4 : Type<CPred<"$_self.isFloat8E3M4()">, "f8E3M4 type">,
346346
BuildableType<"$_builder.getFloat8E3M4Type()">;
347+
def F6E3M2FN : Type<CPred<"$_self.isFloat6E3M2FN()">, "f6E3M2FN type">,
348+
BuildableType<"$_builder.getFloat6E3M2FNType()">;
347349

348350
def AnyComplex : Type<CPred<"::llvm::isa<::mlir::ComplexType>($_self)">,
349351
"complex-type", "::mlir::ComplexType">;

mlir/include/mlir/IR/Types.h

+1
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ class Type {
132132
bool isFloat8E4M3FNUZ() const;
133133
bool isFloat8E4M3B11FNUZ() const;
134134
bool isFloat8E3M4() const;
135+
bool isFloat6E3M2FN() const;
135136
bool isBF16() const;
136137
bool isF16() const;
137138
bool isTF32() const;

mlir/lib/AsmParser/TokenKinds.def

+1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ TOK_KEYWORD(f8E5M2FNUZ)
101101
TOK_KEYWORD(f8E4M3FNUZ)
102102
TOK_KEYWORD(f8E4M3B11FNUZ)
103103
TOK_KEYWORD(f8E3M4)
104+
TOK_KEYWORD(f6E3M2FN)
104105
TOK_KEYWORD(f128)
105106
TOK_KEYWORD(false)
106107
TOK_KEYWORD(floordiv)

mlir/lib/AsmParser/TypeParser.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ OptionalParseResult Parser::parseOptionalType(Type &type) {
4646
case Token::kw_f8E4M3FNUZ:
4747
case Token::kw_f8E4M3B11FNUZ:
4848
case Token::kw_f8E3M4:
49+
case Token::kw_f6E3M2FN:
4950
case Token::kw_bf16:
5051
case Token::kw_f16:
5152
case Token::kw_tf32:
@@ -324,6 +325,9 @@ Type Parser::parseNonFunctionType() {
324325
case Token::kw_f8E3M4:
325326
consumeToken(Token::kw_f8E3M4);
326327
return builder.getFloat8E3M4Type();
328+
case Token::kw_f6E3M2FN:
329+
consumeToken(Token::kw_f6E3M2FN);
330+
return builder.getFloat6E3M2FNType();
327331
case Token::kw_bf16:
328332
consumeToken(Token::kw_bf16);
329333
return builder.getBF16Type();

mlir/lib/Bindings/Python/IRTypes.cpp

+22
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,27 @@ class PyFloat8E3M4Type : public PyConcreteType<PyFloat8E3M4Type, PyFloatType> {
266266
}
267267
};
268268

269+
/// Floating Point Type subclass - Float6E3M2FNType.
270+
class PyFloat6E3M2FNType
271+
: public PyConcreteType<PyFloat6E3M2FNType, PyFloatType> {
272+
public:
273+
static constexpr IsAFunctionTy isaFunction = mlirTypeIsAFloat6E3M2FN;
274+
static constexpr GetTypeIDFunctionTy getTypeIdFunction =
275+
mlirFloat6E3M2FNTypeGetTypeID;
276+
static constexpr const char *pyClassName = "Float6E3M2FNType";
277+
using PyConcreteType::PyConcreteType;
278+
279+
static void bindDerived(ClassTy &c) {
280+
c.def_static(
281+
"get",
282+
[](DefaultingPyMlirContext context) {
283+
MlirType t = mlirFloat6E3M2FNTypeGet(context->get());
284+
return PyFloat6E3M2FNType(context->getRef(), t);
285+
},
286+
py::arg("context") = py::none(), "Create a float6_e3m2fn type.");
287+
}
288+
};
289+
269290
/// Floating Point Type subclass - BF16Type.
270291
class PyBF16Type : public PyConcreteType<PyBF16Type, PyFloatType> {
271292
public:
@@ -885,6 +906,7 @@ void mlir::python::populateIRTypes(py::module &m) {
885906
PyFloat8E4M3B11FNUZType::bind(m);
886907
PyFloat8E5M2FNUZType::bind(m);
887908
PyFloat8E3M4Type::bind(m);
909+
PyFloat6E3M2FNType::bind(m);
888910
PyBF16Type::bind(m);
889911
PyF16Type::bind(m);
890912
PyTF32Type::bind(m);

mlir/lib/CAPI/IR/BuiltinTypes.cpp

+12
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,18 @@ MlirType mlirFloat8E3M4TypeGet(MlirContext ctx) {
169169
return wrap(FloatType::getFloat8E3M4(unwrap(ctx)));
170170
}
171171

172+
MlirTypeID mlirFloat6E3M2FNTypeGetTypeID() {
173+
return wrap(Float6E3M2FNType::getTypeID());
174+
}
175+
176+
bool mlirTypeIsAFloat6E3M2FN(MlirType type) {
177+
return unwrap(type).isFloat6E3M2FN();
178+
}
179+
180+
MlirType mlirFloat6E3M2FNTypeGet(MlirContext ctx) {
181+
return wrap(FloatType::getFloat6E3M2FN(unwrap(ctx)));
182+
}
183+
172184
MlirTypeID mlirBFloat16TypeGetTypeID() {
173185
return wrap(BFloat16Type::getTypeID());
174186
}

mlir/lib/Conversion/LLVMCommon/TypeConverter.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,8 @@ Type LLVMTypeConverter::convertIntegerType(IntegerType type) const {
249249
Type LLVMTypeConverter::convertFloatType(FloatType type) const {
250250
if (type.isFloat8E5M2() || type.isFloat8E4M3() || type.isFloat8E4M3FN() ||
251251
type.isFloat8E5M2FNUZ() || type.isFloat8E4M3FNUZ() ||
252-
type.isFloat8E4M3B11FNUZ() || type.isFloat8E3M4())
252+
type.isFloat8E4M3B11FNUZ() || type.isFloat8E3M4() ||
253+
type.isFloat6E3M2FN())
253254
return IntegerType::get(&getContext(), type.getWidth());
254255
return type;
255256
}

mlir/lib/Dialect/Arith/Transforms/EmulateUnsupportedFloats.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ static std::optional<FloatType> parseFloatType(MLIRContext *ctx,
6161
.Case("f8E5M2FNUZ", b.getFloat8E5M2FNUZType())
6262
.Case("f8E4M3FNUZ", b.getFloat8E4M3FNUZType())
6363
.Case("f8E3M4", b.getFloat8E3M4Type())
64+
.Case("f6E3M2FN", b.getFloat6E3M2FNType())
6465
.Case("bf16", b.getBF16Type())
6566
.Case("f16", b.getF16Type())
6667
.Case("f32", b.getF32Type())

mlir/lib/IR/AsmPrinter.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -2582,6 +2582,7 @@ void AsmPrinter::Impl::printTypeImpl(Type type) {
25822582
.Case<Float8E4M3FNUZType>([&](Type) { os << "f8E4M3FNUZ"; })
25832583
.Case<Float8E4M3B11FNUZType>([&](Type) { os << "f8E4M3B11FNUZ"; })
25842584
.Case<Float8E3M4Type>([&](Type) { os << "f8E3M4"; })
2585+
.Case<Float6E3M2FNType>([&](Type) { os << "f6E3M2FN"; })
25852586
.Case<BFloat16Type>([&](Type) { os << "bf16"; })
25862587
.Case<Float16Type>([&](Type) { os << "f16"; })
25872588
.Case<FloatTF32Type>([&](Type) { os << "tf32"; })

mlir/lib/IR/Builders.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ FloatType Builder::getFloat8E3M4Type() {
6262
return FloatType::getFloat8E3M4(context);
6363
}
6464

65+
FloatType Builder::getFloat6E3M2FNType() {
66+
return FloatType::getFloat6E3M2FN(context);
67+
}
68+
6569
FloatType Builder::getBF16Type() { return FloatType::getBF16(context); }
6670

6771
FloatType Builder::getF16Type() { return FloatType::getF16(context); }

mlir/lib/IR/BuiltinTypes.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ IntegerType IntegerType::scaleElementBitwidth(unsigned scale) {
9191
//===----------------------------------------------------------------------===//
9292

9393
unsigned FloatType::getWidth() {
94+
if (llvm::isa<Float6E3M2FNType>(*this))
95+
return 6;
9496
if (llvm::isa<Float8E5M2Type, Float8E4M3Type, Float8E4M3FNType,
9597
Float8E5M2FNUZType, Float8E4M3FNUZType, Float8E4M3B11FNUZType,
9698
Float8E3M4Type>(*this))
@@ -124,6 +126,8 @@ const llvm::fltSemantics &FloatType::getFloatSemantics() {
124126
return APFloat::Float8E4M3B11FNUZ();
125127
if (llvm::isa<Float8E3M4Type>(*this))
126128
return APFloat::Float8E3M4();
129+
if (llvm::isa<Float6E3M2FNType>(*this))
130+
return APFloat::Float6E3M2FN();
127131
if (llvm::isa<BFloat16Type>(*this))
128132
return APFloat::BFloat();
129133
if (llvm::isa<Float16Type>(*this))

mlir/lib/IR/MLIRContext.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ class MLIRContextImpl {
228228
Float8E4M3FNUZType f8E4M3FNUZTy;
229229
Float8E4M3B11FNUZType f8E4M3B11FNUZTy;
230230
Float8E3M4Type f8E3M4Ty;
231+
Float6E3M2FNType f6E3M2FNTy;
231232
BFloat16Type bf16Ty;
232233
Float16Type f16Ty;
233234
FloatTF32Type tf32Ty;
@@ -320,6 +321,7 @@ MLIRContext::MLIRContext(const DialectRegistry &registry, Threading setting)
320321
impl->f8E4M3FNUZTy = TypeUniquer::get<Float8E4M3FNUZType>(this);
321322
impl->f8E4M3B11FNUZTy = TypeUniquer::get<Float8E4M3B11FNUZType>(this);
322323
impl->f8E3M4Ty = TypeUniquer::get<Float8E3M4Type>(this);
324+
impl->f6E3M2FNTy = TypeUniquer::get<Float6E3M2FNType>(this);
323325
impl->bf16Ty = TypeUniquer::get<BFloat16Type>(this);
324326
impl->f16Ty = TypeUniquer::get<Float16Type>(this);
325327
impl->tf32Ty = TypeUniquer::get<FloatTF32Type>(this);
@@ -1034,6 +1036,9 @@ Float8E4M3B11FNUZType Float8E4M3B11FNUZType::get(MLIRContext *context) {
10341036
Float8E3M4Type Float8E3M4Type::get(MLIRContext *context) {
10351037
return context->getImpl().f8E3M4Ty;
10361038
}
1039+
Float6E3M2FNType Float6E3M2FNType::get(MLIRContext *context) {
1040+
return context->getImpl().f6E3M2FNTy;
1041+
}
10371042
BFloat16Type BFloat16Type::get(MLIRContext *context) {
10381043
return context->getImpl().bf16Ty;
10391044
}

mlir/lib/IR/Types.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ bool Type::isFloat8E4M3B11FNUZ() const {
4747
return llvm::isa<Float8E4M3B11FNUZType>(*this);
4848
}
4949
bool Type::isFloat8E3M4() const { return llvm::isa<Float8E3M4Type>(*this); }
50+
bool Type::isFloat6E3M2FN() const { return llvm::isa<Float6E3M2FNType>(*this); }
5051
bool Type::isBF16() const { return llvm::isa<BFloat16Type>(*this); }
5152
bool Type::isF16() const { return llvm::isa<Float16Type>(*this); }
5253
bool Type::isTF32() const { return llvm::isa<FloatTF32Type>(*this); }

mlir/python/mlir/_mlir_libs/_mlir/ir.pyi

+14
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ __all__ = [
120120
"F32Type",
121121
"F64Type",
122122
"FlatSymbolRefAttr",
123+
"Float6E3M2FNType",
123124
"Float8E3M4Type",
124125
"Float8E4M3B11FNUZType",
125126
"Float8E4M3FNType",
@@ -1538,6 +1539,19 @@ class FlatSymbolRefAttr(Attribute):
15381539
Returns the value of the FlatSymbolRef attribute as a string
15391540
"""
15401541

1542+
class Float6E3M2FNType(FloatType):
1543+
static_typeid: ClassVar[TypeID]
1544+
@staticmethod
1545+
def get(context: Optional[Context] = None) -> Float6E3M2FNType:
1546+
"""
1547+
Create a float6_e3m2fn type.
1548+
"""
1549+
@staticmethod
1550+
def isinstance(other: Type) -> bool: ...
1551+
def __init__(self, cast_from_type: Type) -> None: ...
1552+
@property
1553+
def typeid(self) -> TypeID: ...
1554+
15411555
class Float8E3M4Type(FloatType):
15421556
static_typeid: ClassVar[TypeID]
15431557
@staticmethod

mlir/python/mlir/extras/types.py

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
F16Type,
1313
F32Type,
1414
F64Type,
15+
Float6E3M2FNType,
1516
Float8E3M4Type,
1617
Float8E4M3B11FNUZType,
1718
Float8E4M3FNType,
@@ -74,6 +75,7 @@ def ui(width):
7475
f8E4M3FN = lambda: Float8E4M3FNType.get()
7576
f8E4M3B11FNUZ = lambda: Float8E4M3B11FNUZType.get()
7677
f8E3M4 = lambda: Float8E3M4Type.get()
78+
f6E3M2FN = lambda: Float6E3M2FNType.get()
7779

7880
none = lambda: NoneType.get()
7981

mlir/test/IR/attribute.mlir

+4
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ func.func @float_attrs_pass() {
6464
// CHECK: float_attr = 2.000000e+00 : f8E3M4
6565
float_attr = 2. : f8E3M4
6666
} : () -> ()
67+
"test.float_attrs"() {
68+
// CHECK: float_attr = 2.000000e+00 : f6E3M2FN
69+
float_attr = 2. : f6E3M2FN
70+
} : () -> ()
6771
"test.float_attrs"() {
6872
// CHECK: float_attr = 2.000000e+00 : f16
6973
float_attr = 2. : f16

mlir/test/Target/LLVMIR/llvmir.mlir

+3
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ llvm.mlir.global internal constant @string_const("foobar") : !llvm.array<6 x i8>
3939
// CHECK: @int_global_undef = internal global i64 undef
4040
llvm.mlir.global internal @int_global_undef() : i64
4141

42+
// CHECK: @f6E3M2FN_global_as_i6 = internal global i6 14
43+
llvm.mlir.global internal @f6E3M2FN_global_as_i6(1.5 : f6E3M2FN) : i6
44+
4245
// CHECK: @f8E3M4_global_as_i8 = internal global i8 56
4346
llvm.mlir.global internal @f8E3M4_global_as_i8(1.5 : f8E3M4) : i8
4447

mlir/test/python/ir/builtin_types.py

+9
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ def testTypeIsInstance():
113113
def testFloatTypeSubclasses():
114114
ctx = Context()
115115
# CHECK: True
116+
print(isinstance(Type.parse("f6E3M2FN", ctx), FloatType))
117+
# CHECK: True
116118
print(isinstance(Type.parse("f8E3M4", ctx), FloatType))
117119
# CHECK: True
118120
print(isinstance(Type.parse("f8E4M3", ctx), FloatType))
@@ -233,6 +235,8 @@ def testIndexType():
233235
@run
234236
def testFloatType():
235237
with Context():
238+
# CHECK: float: f6E3M2FN
239+
print("float:", Float6E3M2FNType.get())
236240
# CHECK: float: f8E3M4
237241
print("float:", Float8E3M4Type.get())
238242
# CHECK: float: f8E4M3
@@ -609,6 +613,7 @@ def testTypeIDs():
609613
types = [
610614
(IntegerType, IntegerType.get_signless(16)),
611615
(IndexType, IndexType.get()),
616+
(Float6E3M2FNType, Float6E3M2FNType.get()),
612617
(Float8E3M4Type, Float8E3M4Type.get()),
613618
(Float8E4M3Type, Float8E4M3Type.get()),
614619
(Float8E4M3FNType, Float8E4M3FNType.get()),
@@ -634,6 +639,7 @@ def testTypeIDs():
634639

635640
# CHECK: IntegerType(i16)
636641
# CHECK: IndexType(index)
642+
# CHECK: Float6E3M2FNType(f6E3M2FN)
637643
# CHECK: Float8E3M4Type(f8E3M4)
638644
# CHECK: Float8E4M3Type(f8E4M3)
639645
# CHECK: Float8E4M3FNType(f8E4M3FN)
@@ -713,6 +719,9 @@ def print_downcasted(typ):
713719
# CHECK: F64Type
714720
# CHECK: F64Type(f64)
715721
print_downcasted(F64Type.get())
722+
# CHECK: Float6E3M2FNType
723+
# CHECK: Float6E3M2FNType(f6E3M2FN)
724+
print_downcasted(Float6E3M2FNType.get())
716725
# CHECK: Float8E3M4Type
717726
# CHECK: Float8E3M4Type(f8E3M4)
718727
print_downcasted(Float8E3M4Type.get())

0 commit comments

Comments
 (0)