Skip to content

Commit 918222b

Browse files
authored
[MLIR] Add f6E3M2FN type (#105573)
This PR adds `f6E3M2FN` type to mlir. `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 7e07c1d commit 918222b

File tree

25 files changed

+137
-7
lines changed

25 files changed

+137
-7
lines changed

llvm/unittests/ADT/APFloatTest.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -2084,16 +2084,17 @@ 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");
2089-
2090-
test = APFloat::getSmallestNormalized(APFloat::Float4E2M1FN(), false);
2091-
expected = APFloat(APFloat::Float4E2M1FN(), "0x1p0");
20922090
EXPECT_FALSE(test.isNegative());
20932091
EXPECT_TRUE(test.isFiniteNonZero());
20942092
EXPECT_FALSE(test.isDenormal());
20952093
EXPECT_TRUE(test.bitwiseIsEqual(expected));
20962094
EXPECT_TRUE(test.isSmallestNormalized());
2095+
2096+
test = APFloat::getSmallestNormalized(APFloat::Float4E2M1FN(), false);
2097+
expected = APFloat(APFloat::Float4E2M1FN(), "0x1p0");
20972098
EXPECT_FALSE(test.isNegative());
20982099
EXPECT_TRUE(test.isFiniteNonZero());
20992100
EXPECT_FALSE(test.isDenormal());

mlir/include/mlir-c/BuiltinTypes.h

+10
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,16 @@ MLIR_CAPI_EXPORTED bool mlirTypeIsAFloat(MlirType type);
7979
/// Returns the bitwidth of a floating-point type.
8080
MLIR_CAPI_EXPORTED unsigned mlirFloatTypeGetWidth(MlirType type);
8181

82+
/// Returns the typeID of an Float6E3M2FN type.
83+
MLIR_CAPI_EXPORTED MlirTypeID mlirFloat6E3M2FNTypeGetTypeID(void);
84+
85+
/// Checks whether the given type is an f6E3M2FN type.
86+
MLIR_CAPI_EXPORTED bool mlirTypeIsAFloat6E3M2FN(MlirType type);
87+
88+
/// Creates an f6E3M2FN type in the given context. The type is owned by the
89+
/// context.
90+
MLIR_CAPI_EXPORTED MlirType mlirFloat6E3M2FNTypeGet(MlirContext ctx);
91+
8292
/// Returns the typeID of an Float8E5M2 type.
8393
MLIR_CAPI_EXPORTED MlirTypeID mlirFloat8E5M2TypeGetTypeID(void);
8494

mlir/include/mlir/IR/Builders.h

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ class Builder {
6060
Attribute metadata = Attribute());
6161

6262
// Types.
63+
FloatType getFloat6E3M2FNType();
6364
FloatType getFloat8E5M2Type();
6465
FloatType getFloat8E4M3Type();
6566
FloatType getFloat8E4M3FNType();

mlir/include/mlir/IR/BuiltinTypes.h

+7-2
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);
@@ -413,13 +414,17 @@ inline bool BaseMemRefType::isValidElementType(Type type) {
413414
}
414415

415416
inline bool FloatType::classof(Type type) {
416-
return llvm::isa<Float8E5M2Type, Float8E4M3Type, Float8E4M3FNType,
417-
Float8E5M2FNUZType, Float8E4M3FNUZType,
417+
return llvm::isa<Float6E3M2FNType, Float8E5M2Type, Float8E4M3Type,
418+
Float8E4M3FNType, Float8E5M2FNUZType, Float8E4M3FNUZType,
418419
Float8E4M3B11FNUZType, Float8E3M4Type, BFloat16Type,
419420
Float16Type, FloatTF32Type, Float32Type, Float64Type,
420421
Float80Type, Float128Type>(type);
421422
}
422423

424+
inline FloatType FloatType::getFloat6E3M2FN(MLIRContext *ctx) {
425+
return Float6E3M2FNType::get(ctx);
426+
}
427+
423428
inline FloatType FloatType::getFloat8E5M2(MLIRContext *ctx) {
424429
return Float8E5M2Type::get(ctx);
425430
}

mlir/include/mlir/IR/BuiltinTypes.td

+21
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,27 @@ 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+
Open Compute Project (OCP) microscaling formats (MX) specification:
253+
https://www.opencompute.org/documents/ocp-microscaling-formats-mx-v1-0-spec-final-pdf
254+
}];
255+
}
256+
236257
//===----------------------------------------------------------------------===//
237258
// BFloat16Type
238259

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
@@ -125,6 +125,7 @@ class Type {
125125
// Convenience predicates. This is only for floating point types,
126126
// derived types should use isa/dyn_cast.
127127
bool isIndex() const;
128+
bool isFloat6E3M2FN() const;
128129
bool isFloat8E5M2() const;
129130
bool isFloat8E4M3() const;
130131
bool isFloat8E4M3FN() 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
@@ -39,6 +39,7 @@ OptionalParseResult Parser::parseOptionalType(Type &type) {
3939
case Token::kw_tuple:
4040
case Token::kw_vector:
4141
case Token::inttype:
42+
case Token::kw_f6E3M2FN:
4243
case Token::kw_f8E5M2:
4344
case Token::kw_f8E4M3:
4445
case Token::kw_f8E4M3FN:
@@ -303,6 +304,9 @@ Type Parser::parseNonFunctionType() {
303304
}
304305

305306
// float-type
307+
case Token::kw_f6E3M2FN:
308+
consumeToken(Token::kw_f6E3M2FN);
309+
return builder.getFloat6E3M2FNType();
306310
case Token::kw_f8E5M2:
307311
consumeToken(Token::kw_f8E5M2);
308312
return builder.getFloat8E5M2Type();

mlir/lib/Bindings/Python/IRTypes.cpp

+22
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,27 @@ class PyFloatType : public PyConcreteType<PyFloatType> {
124124
}
125125
};
126126

127+
/// Floating Point Type subclass - Float6E3M2FNType.
128+
class PyFloat6E3M2FNType
129+
: public PyConcreteType<PyFloat6E3M2FNType, PyFloatType> {
130+
public:
131+
static constexpr IsAFunctionTy isaFunction = mlirTypeIsAFloat6E3M2FN;
132+
static constexpr GetTypeIDFunctionTy getTypeIdFunction =
133+
mlirFloat6E3M2FNTypeGetTypeID;
134+
static constexpr const char *pyClassName = "Float6E3M2FNType";
135+
using PyConcreteType::PyConcreteType;
136+
137+
static void bindDerived(ClassTy &c) {
138+
c.def_static(
139+
"get",
140+
[](DefaultingPyMlirContext context) {
141+
MlirType t = mlirFloat6E3M2FNTypeGet(context->get());
142+
return PyFloat6E3M2FNType(context->getRef(), t);
143+
},
144+
py::arg("context") = py::none(), "Create a float6_e3m2fn type.");
145+
}
146+
};
147+
127148
/// Floating Point Type subclass - Float8E4M3FNType.
128149
class PyFloat8E4M3FNType
129150
: public PyConcreteType<PyFloat8E4M3FNType, PyFloatType> {
@@ -880,6 +901,7 @@ void mlir::python::populateIRTypes(py::module &m) {
880901
PyIntegerType::bind(m);
881902
PyFloatType::bind(m);
882903
PyIndexType::bind(m);
904+
PyFloat6E3M2FNType::bind(m);
883905
PyFloat8E4M3FNType::bind(m);
884906
PyFloat8E5M2Type::bind(m);
885907
PyFloat8E4M3Type::bind(m);

mlir/lib/CAPI/IR/BuiltinTypes.cpp

+12
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,18 @@ unsigned mlirFloatTypeGetWidth(MlirType type) {
8585
return llvm::cast<FloatType>(unwrap(type)).getWidth();
8686
}
8787

88+
MlirTypeID mlirFloat6E3M2FNTypeGetTypeID() {
89+
return wrap(Float6E3M2FNType::getTypeID());
90+
}
91+
92+
bool mlirTypeIsAFloat6E3M2FN(MlirType type) {
93+
return unwrap(type).isFloat6E3M2FN();
94+
}
95+
96+
MlirType mlirFloat6E3M2FNTypeGet(MlirContext ctx) {
97+
return wrap(FloatType::getFloat6E3M2FN(unwrap(ctx)));
98+
}
99+
88100
MlirTypeID mlirFloat8E5M2TypeGetTypeID() {
89101
return wrap(Float8E5M2Type::getTypeID());
90102
}

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
@@ -55,6 +55,7 @@ static std::optional<FloatType> parseFloatType(MLIRContext *ctx,
5555
StringRef name) {
5656
Builder b(ctx);
5757
return llvm::StringSwitch<std::optional<FloatType>>(name)
58+
.Case("f6E3M2FN", b.getFloat6E3M2FNType())
5859
.Case("f8E5M2", b.getFloat8E5M2Type())
5960
.Case("f8E4M3", b.getFloat8E4M3Type())
6061
.Case("f8E4M3FN", b.getFloat8E4M3FNType())

mlir/lib/IR/AsmPrinter.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -2575,6 +2575,7 @@ void AsmPrinter::Impl::printTypeImpl(Type type) {
25752575
opaqueTy.getTypeData());
25762576
})
25772577
.Case<IndexType>([&](Type) { os << "index"; })
2578+
.Case<Float6E3M2FNType>([&](Type) { os << "f6E3M2FN"; })
25782579
.Case<Float8E5M2Type>([&](Type) { os << "f8E5M2"; })
25792580
.Case<Float8E4M3Type>([&](Type) { os << "f8E4M3"; })
25802581
.Case<Float8E4M3FNType>([&](Type) { os << "f8E4M3FN"; })

mlir/lib/IR/Builders.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ Location Builder::getFusedLoc(ArrayRef<Location> locs, Attribute metadata) {
3434
// Types.
3535
//===----------------------------------------------------------------------===//
3636

37+
FloatType Builder::getFloat6E3M2FNType() {
38+
return FloatType::getFloat6E3M2FN(context);
39+
}
40+
3741
FloatType Builder::getFloat8E5M2Type() {
3842
return FloatType::getFloat8E5M2(context);
3943
}

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))
@@ -110,6 +112,8 @@ unsigned FloatType::getWidth() {
110112

111113
/// Returns the floating semantics for the given type.
112114
const llvm::fltSemantics &FloatType::getFloatSemantics() {
115+
if (llvm::isa<Float6E3M2FNType>(*this))
116+
return APFloat::Float6E3M2FN();
113117
if (llvm::isa<Float8E5M2Type>(*this))
114118
return APFloat::Float8E5M2();
115119
if (llvm::isa<Float8E4M3Type>(*this))

mlir/lib/IR/MLIRContext.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ class MLIRContextImpl {
221221
llvm::DenseMap<StringRef, AbstractType *> nameToType;
222222

223223
/// Cached Type Instances.
224+
Float6E3M2FNType f6E3M2FNTy;
224225
Float8E5M2Type f8E5M2Ty;
225226
Float8E4M3Type f8E4M3Ty;
226227
Float8E4M3FNType f8E4M3FNTy;
@@ -313,6 +314,7 @@ MLIRContext::MLIRContext(const DialectRegistry &registry, Threading setting)
313314

314315
//// Types.
315316
/// Floating-point Types.
317+
impl->f6E3M2FNTy = TypeUniquer::get<Float6E3M2FNType>(this);
316318
impl->f8E5M2Ty = TypeUniquer::get<Float8E5M2Type>(this);
317319
impl->f8E4M3Ty = TypeUniquer::get<Float8E4M3Type>(this);
318320
impl->f8E4M3FNTy = TypeUniquer::get<Float8E4M3FNType>(this);
@@ -1013,6 +1015,9 @@ AbstractType::lookup(StringRef name, MLIRContext *context) {
10131015
/// This should not be used directly.
10141016
StorageUniquer &MLIRContext::getTypeUniquer() { return getImpl().typeUniquer; }
10151017

1018+
Float6E3M2FNType Float6E3M2FNType::get(MLIRContext *context) {
1019+
return context->getImpl().f6E3M2FNTy;
1020+
}
10161021
Float8E5M2Type Float8E5M2Type::get(MLIRContext *context) {
10171022
return context->getImpl().f8E5M2Ty;
10181023
}

mlir/lib/IR/Types.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Type AbstractType::replaceImmediateSubElements(Type type,
3434

3535
MLIRContext *Type::getContext() const { return getDialect().getContext(); }
3636

37+
bool Type::isFloat6E3M2FN() const { return llvm::isa<Float6E3M2FNType>(*this); }
3738
bool Type::isFloat8E5M2() const { return llvm::isa<Float8E5M2Type>(*this); }
3839
bool Type::isFloat8E4M3() const { return llvm::isa<Float8E4M3Type>(*this); }
3940
bool Type::isFloat8E4M3FN() const { return llvm::isa<Float8E4M3FNType>(*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",
@@ -1539,6 +1540,19 @@ class FlatSymbolRefAttr(Attribute):
15391540
Returns the value of the FlatSymbolRef attribute as a string
15401541
"""
15411542

1543+
class Float6E3M2FNType(FloatType):
1544+
static_typeid: ClassVar[TypeID]
1545+
@staticmethod
1546+
def get(context: Optional[Context] = None) -> Float6E3M2FNType:
1547+
"""
1548+
Create a float6_e3m2fn type.
1549+
"""
1550+
@staticmethod
1551+
def isinstance(other: Type) -> bool: ...
1552+
def __init__(self, cast_from_type: Type) -> None: ...
1553+
@property
1554+
def typeid(self) -> TypeID: ...
1555+
15421556
class Float8E3M4Type(FloatType):
15431557
static_typeid: ClassVar[TypeID]
15441558
@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
@@ -36,6 +36,10 @@ func.func @any_attr_of_fail() {
3636
//===----------------------------------------------------------------------===//
3737

3838
func.func @float_attrs_pass() {
39+
"test.float_attrs"() {
40+
// CHECK: float_attr = 2.000000e+00 : f6E3M2FN
41+
float_attr = 2. : f6E3M2FN
42+
} : () -> ()
3943
"test.float_attrs"() {
4044
// CHECK: float_attr = 2.000000e+00 : f8E5M2
4145
float_attr = 2. : f8E5M2

mlir/test/Target/LLVMIR/llvmir.mlir

+3
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ llvm.mlir.global internal @int_global_undef() : i64
4242
// CHECK: @externally_initialized_global = internal externally_initialized global i32 0
4343
llvm.mlir.global internal @externally_initialized_global(0 : i32) {externally_initialized} : i32
4444

45+
// CHECK: @f6E3M2FN_global_as_i6 = internal global i6 14
46+
llvm.mlir.global internal @f6E3M2FN_global_as_i6(1.5 : f6E3M2FN) : i6
47+
4548
// CHECK: @f8E3M4_global_as_i8 = internal global i8 56
4649
llvm.mlir.global internal @f8E3M4_global_as_i8(1.5 : f8E3M4) : i8
4750

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)