31 return llvm::isa<IntegerType>(
unwrap(type));
35 return wrap(IntegerType::get(
unwrap(ctx), bitwidth));
41 return wrap(IntegerType::get(
unwrap(ctx), bitwidth, IntegerType::Signed));
45 return wrap(IntegerType::get(
unwrap(ctx), bitwidth, IntegerType::Unsigned));
49 return llvm::cast<IntegerType>(
unwrap(type)).getWidth();
53 return llvm::cast<IntegerType>(
unwrap(type)).isSignless();
57 return llvm::cast<IntegerType>(
unwrap(type)).isSigned();
61 return llvm::cast<IntegerType>(
unwrap(type)).isUnsigned();
71 return llvm::isa<IndexType>(
unwrap(type));
85 return llvm::isa<FloatType>(
unwrap(type));
89 return llvm::cast<FloatType>(
unwrap(type)).getWidth();
93 return wrap(Float4E2M1FNType::getTypeID());
97 return llvm::isa<Float4E2M1FNType>(
unwrap(type));
101 return wrap(Float4E2M1FNType::get(
unwrap(ctx)));
105 return wrap(Float4E2M1FNType::name);
109 return wrap(Float6E2M3FNType::getTypeID());
113 return llvm::isa<Float6E2M3FNType>(
unwrap(type));
117 return wrap(Float6E2M3FNType::get(
unwrap(ctx)));
121 return wrap(Float6E2M3FNType::name);
125 return wrap(Float6E3M2FNType::getTypeID());
129 return llvm::isa<Float6E3M2FNType>(
unwrap(type));
133 return wrap(Float6E3M2FNType::get(
unwrap(ctx)));
137 return wrap(Float6E3M2FNType::name);
141 return wrap(Float8E5M2Type::getTypeID());
145 return llvm::isa<Float8E5M2Type>(
unwrap(type));
149 return wrap(Float8E5M2Type::get(
unwrap(ctx)));
153 return wrap(Float8E5M2Type::name);
157 return wrap(Float8E4M3Type::getTypeID());
161 return llvm::isa<Float8E4M3Type>(
unwrap(type));
165 return wrap(Float8E4M3Type::get(
unwrap(ctx)));
169 return wrap(Float8E4M3Type::name);
173 return wrap(Float8E4M3FNType::getTypeID());
177 return llvm::isa<Float8E4M3FNType>(
unwrap(type));
181 return wrap(Float8E4M3FNType::get(
unwrap(ctx)));
185 return wrap(Float8E4M3FNType::name);
189 return wrap(Float8E5M2FNUZType::getTypeID());
193 return llvm::isa<Float8E5M2FNUZType>(
unwrap(type));
197 return wrap(Float8E5M2FNUZType::get(
unwrap(ctx)));
201 return wrap(Float8E5M2FNUZType::name);
205 return wrap(Float8E4M3FNUZType::getTypeID());
209 return llvm::isa<Float8E4M3FNUZType>(
unwrap(type));
213 return wrap(Float8E4M3FNUZType::get(
unwrap(ctx)));
217 return wrap(Float8E4M3FNUZType::name);
221 return wrap(Float8E4M3B11FNUZType::getTypeID());
225 return llvm::isa<Float8E4M3B11FNUZType>(
unwrap(type));
229 return wrap(Float8E4M3B11FNUZType::get(
unwrap(ctx)));
233 return wrap(Float8E4M3B11FNUZType::name);
237 return wrap(Float8E3M4Type::getTypeID());
241 return llvm::isa<Float8E3M4Type>(
unwrap(type));
245 return wrap(Float8E3M4Type::get(
unwrap(ctx)));
249 return wrap(Float8E3M4Type::name);
253 return wrap(Float8E8M0FNUType::getTypeID());
257 return llvm::isa<Float8E8M0FNUType>(
unwrap(type));
261 return wrap(Float8E8M0FNUType::get(
unwrap(ctx)));
265 return wrap(Float8E8M0FNUType::name);
269 return wrap(Float8E5M3FNUType::getTypeID());
273 return llvm::isa<Float8E5M3FNUType>(
unwrap(type));
277 return wrap(Float8E5M3FNUType::get(
unwrap(ctx)));
281 return wrap(Float8E5M3FNUType::name);
285 return wrap(BFloat16Type::getTypeID());
289 return llvm::isa<BFloat16Type>(
unwrap(type));
301 return llvm::isa<Float16Type>(
unwrap(type));
311 return wrap(FloatTF32Type::getTypeID());
315 return llvm::isa<FloatTF32Type>(
unwrap(type));
327 return llvm::isa<Float32Type>(
unwrap(type));
339 return llvm::isa<Float64Type>(
unwrap(type));
355 return llvm::isa<NoneType>(
unwrap(type));
371 return llvm::isa<ComplexType>(
unwrap(type));
375 return wrap(ComplexType::get(
unwrap(elementType)));
389 return llvm::isa<ShapedType>(
unwrap(type));
397 return llvm::cast<ShapedType>(
unwrap(type)).hasRank();
401 return llvm::cast<ShapedType>(
unwrap(type)).getRank();
405 return llvm::cast<ShapedType>(
unwrap(type)).hasStaticShape();
409 return llvm::cast<ShapedType>(
unwrap(type))
410 .isDynamicDim(
static_cast<unsigned>(dim));
414 return llvm::cast<ShapedType>(
unwrap(type))
415 .isStaticDim(
static_cast<unsigned>(dim));
419 return llvm::cast<ShapedType>(
unwrap(type))
420 .getDimSize(
static_cast<unsigned>(dim));
426 return ShapedType::isDynamic(size);
430 return ShapedType::isStatic(size);
434 return ShapedType::isDynamic(val);
438 return ShapedType::isStatic(val);
442 return ShapedType::kDynamic;
452 return llvm::isa<VectorType>(
unwrap(type));
456 MlirType elementType) {
465 return wrap(VectorType::getChecked(
471 const bool *scalable, MlirType elementType) {
472 return wrap(VectorType::get(
479 const bool *scalable,
480 MlirType elementType) {
481 return wrap(VectorType::getChecked(
488 return cast<VectorType>(
unwrap(type)).isScalable();
492 return cast<VectorType>(
unwrap(type)).getScalableDims()[dim];
500 return llvm::isa<TensorType>(
unwrap(type));
504 return wrap(RankedTensorType::getTypeID());
508 return llvm::isa<RankedTensorType>(
unwrap(type));
512 return wrap(UnrankedTensorType::getTypeID());
516 return llvm::isa<UnrankedTensorType>(
unwrap(type));
520 MlirType elementType, MlirAttribute encoding) {
527 return wrap(RankedTensorType::name);
532 MlirType elementType,
533 MlirAttribute encoding) {
534 return wrap(RankedTensorType::getChecked(
540 return wrap(llvm::cast<RankedTensorType>(
unwrap(type)).getEncoding());
544 return wrap(UnrankedTensorType::get(
unwrap(elementType)));
548 return wrap(UnrankedTensorType::name);
552 MlirType elementType) {
553 return wrap(UnrankedTensorType::getChecked(
unwrap(loc),
unwrap(elementType)));
563 return llvm::isa<MemRefType>(
unwrap(type));
568 MlirAttribute memorySpace) {
569 return wrap(MemRefType::get(
571 mlirAttributeIsNull(layout)
572 ? MemRefLayoutAttrInterface()
573 : llvm::cast<MemRefLayoutAttrInterface>(
unwrap(layout)),
581 MlirAttribute layout,
582 MlirAttribute memorySpace) {
583 return wrap(MemRefType::getChecked(
586 mlirAttributeIsNull(layout)
587 ? MemRefLayoutAttrInterface()
588 : llvm::cast<MemRefLayoutAttrInterface>(
unwrap(layout)),
594 MlirAttribute memorySpace) {
596 unwrap(elementType), MemRefLayoutAttrInterface(),
601 MlirType elementType,
intptr_t rank,
603 MlirAttribute memorySpace) {
604 return wrap(MemRefType::getChecked(
606 unwrap(elementType), MemRefLayoutAttrInterface(),
unwrap(memorySpace)));
610 return wrap(llvm::cast<MemRefType>(
unwrap(type)).getLayout());
614 return wrap(llvm::cast<MemRefType>(
unwrap(type)).getLayout().getAffineMap());
618 return wrap(llvm::cast<MemRefType>(
unwrap(type)).getMemorySpace());
624 MemRefType memrefType = llvm::cast<MemRefType>(
unwrap(type));
626 if (failed(memrefType.getStridesAndOffset(strides_, *offset)))
629 (
void)llvm::copy(strides_, strides);
634 return wrap(UnrankedMemRefType::getTypeID());
638 return llvm::isa<UnrankedMemRefType>(
unwrap(type));
642 MlirAttribute memorySpace) {
644 UnrankedMemRefType::get(
unwrap(elementType),
unwrap(memorySpace)));
648 return wrap(UnrankedMemRefType::name);
652 MlirType elementType,
653 MlirAttribute memorySpace) {
654 return wrap(UnrankedMemRefType::getChecked(
unwrap(loc),
unwrap(elementType),
659 return wrap(llvm::cast<UnrankedMemRefType>(
unwrap(type)).getMemorySpace());
669 return llvm::isa<TupleType>(
unwrap(type));
673 MlirType
const *elements) {
676 return wrap(TupleType::get(
unwrap(ctx), typeRef));
682 return llvm::cast<TupleType>(
unwrap(type)).size();
687 llvm::cast<TupleType>(
unwrap(type)).
getType(
static_cast<size_t>(pos)));
695 return wrap(FunctionType::getTypeID());
699 return llvm::isa<FunctionType>(
unwrap(type));
703 MlirType
const *inputs,
intptr_t numResults,
704 MlirType
const *results) {
709 return wrap(FunctionType::get(
unwrap(ctx), inputsList, resultsList));
715 return llvm::cast<FunctionType>(
unwrap(type)).getNumInputs();
719 return llvm::cast<FunctionType>(
unwrap(type)).getNumResults();
723 assert(pos >= 0 &&
"pos in array must be positive");
724 return wrap(llvm::cast<FunctionType>(
unwrap(type))
725 .getInput(
static_cast<unsigned>(pos)));
729 assert(pos >= 0 &&
"pos in array must be positive");
730 return wrap(llvm::cast<FunctionType>(
unwrap(type))
731 .getResult(
static_cast<unsigned>(pos)));
741 return llvm::isa<OpaqueType>(
unwrap(type));
747 OpaqueType::get(StringAttr::get(
unwrap(ctx),
unwrap(dialectNamespace)),
755 llvm::cast<OpaqueType>(
unwrap(type)).getDialectNamespace().strref());
759 return wrap(llvm::cast<OpaqueType>(
unwrap(type)).getTypeData());
bool mlirTypeIsAF16(MlirType type)
Checks whether the given type is an f16 type.
MlirTypeID mlirFloat6E2M3FNTypeGetTypeID()
Returns the typeID of an Float6E2M3FN type.
bool mlirTypeIsAF64(MlirType type)
Checks whether the given type is an f64 type.
MlirStringRef mlirF16TypeGetName(void)
bool mlirTypeIsAFloat8E4M3FNUZ(MlirType type)
Checks whether the given type is an f8E4M3FNUZ type.
bool mlirIntegerTypeIsUnsigned(MlirType type)
Checks whether the given integer type is unsigned.
MlirType mlirF32TypeGet(MlirContext ctx)
Creates an f32 type in the given context.
MlirTypeID mlirIntegerTypeGetTypeID()
Returns the typeID of an Integer type.
MlirLogicalResult mlirMemRefTypeGetStridesAndOffset(MlirType type, int64_t *strides, int64_t *offset)
Returns the strides of the MemRef if the layout map is in strided form.
MlirType mlirVectorTypeGetChecked(MlirLocation loc, intptr_t rank, const int64_t *shape, MlirType elementType)
Same as "mlirVectorTypeGet" but returns a nullptr wrapping MlirType on illegal arguments,...
MlirTypeID mlirBFloat16TypeGetTypeID()
Returns the typeID of an BFloat16 type.
MlirStringRef mlirVectorTypeGetName(void)
MlirType mlirIntegerTypeGet(MlirContext ctx, unsigned bitwidth)
Creates a signless integer type of the given bitwidth in the context.
intptr_t mlirFunctionTypeGetNumResults(MlirType type)
Returns the number of result types.
unsigned mlirIntegerTypeGetWidth(MlirType type)
Returns the bitwidth of an integer type.
MlirType mlirFloat8E5M3FNUTypeGet(MlirContext ctx)
Creates an f8E5M3FNU type in the given context.
bool mlirTypeIsAUnrankedTensor(MlirType type)
Checks whether the given type is an unranked tensor type.
MlirStringRef mlirUnrankedTensorTypeGetName(void)
MlirType mlirFloat8E8M0FNUTypeGet(MlirContext ctx)
Creates an f8E8M0FNU type in the given context.
int64_t mlirShapedTypeGetDynamicStrideOrOffset()
Returns the value indicating a dynamic stride or offset in a shaped type.
MlirType mlirF64TypeGet(MlirContext ctx)
Creates a f64 type in the given context.
MlirAttribute mlirUnrankedMemrefGetMemorySpace(MlirType type)
Returns the memory spcae of the given Unranked MemRef type.
bool mlirTypeIsAFloat8E4M3B11FNUZ(MlirType type)
Checks whether the given type is an f8E4M3B11FNUZ type.
bool mlirTypeIsAFloat8E5M2(MlirType type)
Checks whether the given type is an f8E5M2 type.
MlirTypeID mlirFloatTF32TypeGetTypeID()
Returns the typeID of a TF32 type.
MlirType mlirIntegerTypeSignedGet(MlirContext ctx, unsigned bitwidth)
Creates a signed integer type of the given bitwidth in the context.
MlirType mlirFloat6E2M3FNTypeGet(MlirContext ctx)
Creates an f6E2M3FN type in the given context.
MlirTypeID mlirComplexTypeGetTypeID()
Returns the typeID of an Complex type.
int64_t mlirShapedTypeGetDimSize(MlirType type, intptr_t dim)
Returns the dim-th dimension of the given ranked shaped type.
MlirType mlirMemRefTypeGetChecked(MlirLocation loc, MlirType elementType, intptr_t rank, const int64_t *shape, MlirAttribute layout, MlirAttribute memorySpace)
Same as "mlirMemRefTypeGet" but returns a nullptr-wrapping MlirType o illegal arguments,...
MlirType mlirUnrankedTensorTypeGet(MlirType elementType)
Creates an unranked tensor type with the given element type in the same context as the element type.
MlirStringRef mlirOpaqueTypeGetData(MlirType type)
Returns the raw data as a string reference.
bool mlirTypeIsAF32(MlirType type)
Checks whether the given type is an f32 type.
MlirTypeID mlirFloat8E3M4TypeGetTypeID()
Returns the typeID of an Float8E3M4 type.
bool mlirTypeIsAFloat8E5M3FNU(MlirType type)
Checks whether the given type is an f8E5M3FNU type.
MlirTypeID mlirFloat8E4M3B11FNUZTypeGetTypeID()
Returns the typeID of an Float8E4M3B11FNUZ type.
MlirTypeID mlirFunctionTypeGetTypeID()
Returns the typeID of an Function type.
bool mlirTypeIsAFunction(MlirType type)
Checks whether the given type is a function type.
MlirAffineMap mlirMemRefTypeGetAffineMap(MlirType type)
Returns the affine map of the given MemRef type.
MlirTypeID mlirNoneTypeGetTypeID()
Returns the typeID of an None type.
MlirTypeID mlirUnrankedTensorTypeGetTypeID()
Returns the typeID of an UnrankedTensor type.
MlirTypeID mlirMemRefTypeGetTypeID()
Returns the typeID of an MemRef type.
MlirType mlirUnrankedMemRefTypeGetChecked(MlirLocation loc, MlirType elementType, MlirAttribute memorySpace)
Same as "mlirUnrankedMemRefTypeGet" but returns a nullptr wrapping MlirType on illegal arguments,...
MlirStringRef mlirFloat8E8M0FNUTypeGetName(void)
bool mlirTypeIsAMemRef(MlirType type)
Checks whether the given type is a MemRef type.
MlirType mlirFunctionTypeGetResult(MlirType type, intptr_t pos)
Returns the pos-th result type.
MlirType mlirF16TypeGet(MlirContext ctx)
Creates an f16 type in the given context.
MlirStringRef mlirFloat8E3M4TypeGetName(void)
bool mlirTypeIsAComplex(MlirType type)
Checks whether the given type is a Complex type.
MlirStringRef mlirUnrankedMemRefTypeGetName(void)
MlirType mlirNoneTypeGet(MlirContext ctx)
Creates a None type in the given context.
MlirType mlirFloat8E3M4TypeGet(MlirContext ctx)
Creates an f8E3M4 type in the given context.
bool mlirTypeIsATF32(MlirType type)
Checks whether the given type is an TF32 type.
bool mlirShapedTypeHasRank(MlirType type)
Checks whether the given shaped type is ranked.
MlirStringRef mlirBF16TypeGetName(void)
bool mlirTypeIsAShaped(MlirType type)
Checks whether the given type is a Shaped type.
MlirTypeID mlirIndexTypeGetTypeID()
Returns the typeID of an Index type.
MlirStringRef mlirFloat8E5M3FNUTypeGetName(void)
MlirType mlirUnrankedTensorTypeGetChecked(MlirLocation loc, MlirType elementType)
Same as "mlirUnrankedTensorTypeGet" but returns a nullptr wrapping MlirType on illegal arguments,...
MlirStringRef mlirFloat8E5M2FNUZTypeGetName(void)
bool mlirIntegerTypeIsSignless(MlirType type)
Checks whether the given integer type is signless.
MlirType mlirRankedTensorTypeGet(intptr_t rank, const int64_t *shape, MlirType elementType, MlirAttribute encoding)
Creates a tensor type of a fixed rank with the given shape, element type, and optional encoding in th...
MlirTypeID mlirFloat6E3M2FNTypeGetTypeID()
Returns the typeID of an Float6E3M2FN type.
bool mlirShapedTypeIsDynamicDim(MlirType type, intptr_t dim)
Checks whether the dim-th dimension of the given shaped type is dynamic.
MlirType mlirFloat8E4M3B11FNUZTypeGet(MlirContext ctx)
Creates an f8E4M3B11FNUZ type in the given context.
bool mlirVectorTypeIsScalable(MlirType type)
Checks whether the given vector type is scalable, i.e., has at least one scalable dimension.
MlirStringRef mlirFloat6E2M3FNTypeGetName(void)
MlirType mlirFunctionTypeGet(MlirContext ctx, intptr_t numInputs, MlirType const *inputs, intptr_t numResults, MlirType const *results)
Creates a function type, mapping a list of input types to result types.
bool mlirTypeIsAUnrankedMemRef(MlirType type)
Checks whether the given type is an UnrankedMemRef type.
MlirTypeID mlirFloat8E4M3FNUZTypeGetTypeID()
Returns the typeID of an Float8E4M3FNUZ type.
MlirType mlirIntegerTypeUnsignedGet(MlirContext ctx, unsigned bitwidth)
Creates an unsigned integer type of the given bitwidth in the context.
MlirType mlirShapedTypeGetElementType(MlirType type)
Returns the element type of the shaped type.
int64_t mlirShapedTypeGetDynamicSize()
Returns the value indicating a dynamic size in a shaped type.
MlirTypeID mlirFloat8E4M3FNTypeGetTypeID()
Returns the typeID of an Float8E4M3FN type.
bool mlirTypeIsAVector(MlirType type)
Checks whether the given type is a Vector type.
MlirType mlirFloat8E4M3FNUZTypeGet(MlirContext ctx)
Creates an f8E4M3FNUZ type in the given context.
MlirAttribute mlirMemRefTypeGetLayout(MlirType type)
Returns the layout of the given MemRef type.
MlirTypeID mlirFloat64TypeGetTypeID()
Returns the typeID of an Float64 type.
MlirStringRef mlirIndexTypeGetName(void)
MlirStringRef mlirFloat4E2M1FNTypeGetName(void)
MlirType mlirFloat8E5M2FNUZTypeGet(MlirContext ctx)
Creates an f8E5M2FNUZ type in the given context.
MlirType mlirVectorTypeGetScalableChecked(MlirLocation loc, intptr_t rank, const int64_t *shape, const bool *scalable, MlirType elementType)
Same as "mlirVectorTypeGetScalable" but returns a nullptr wrapping MlirType on illegal arguments,...
MlirStringRef mlirF32TypeGetName(void)
MlirStringRef mlirFloat8E4M3TypeGetName(void)
MlirStringRef mlirFloat8E5M2TypeGetName(void)
bool mlirShapedTypeIsDynamicStrideOrOffset(int64_t val)
Checks whether the given value is used as a placeholder for dynamic strides and offsets in shaped typ...
MlirType mlirMemRefTypeGet(MlirType elementType, intptr_t rank, const int64_t *shape, MlirAttribute layout, MlirAttribute memorySpace)
Creates a MemRef type with the given rank and shape, a potentially empty list of affine layout maps,...
bool mlirTypeIsABF16(MlirType type)
Checks whether the given type is a bf16 type.
MlirStringRef mlirF64TypeGetName(void)
intptr_t mlirTupleTypeGetNumTypes(MlirType type)
Returns the number of types contained in a tuple.
MlirType mlirFloat8E4M3TypeGet(MlirContext ctx)
Creates an f8E4M3 type in the given context.
bool mlirVectorTypeIsDimScalable(MlirType type, intptr_t dim)
Checks whether the "dim"-th dimension of the given vector is scalable.
MlirStringRef mlirOpaqueTypeGetDialectNamespace(MlirType type)
Returns the namespace of the dialect with which the given opaque type is associated.
bool mlirTypeIsAFloat4E2M1FN(MlirType type)
Checks whether the given type is an f4E2M1FN type.
bool mlirTypeIsAFloat(MlirType type)
Checks whether the given type is a floating-point type.
MlirType mlirFunctionTypeGetInput(MlirType type, intptr_t pos)
Returns the pos-th input type.
MlirType mlirMemRefTypeContiguousGetChecked(MlirLocation loc, MlirType elementType, intptr_t rank, const int64_t *shape, MlirAttribute memorySpace)
Same as "mlirMemRefTypeContiguousGet" but returns a nullptr wrapping MlirType on illegal arguments,...
bool mlirShapedTypeIsStaticDim(MlirType type, intptr_t dim)
Checks whether the dim-th dimension of the given shaped type is static.
bool mlirTypeIsAInteger(MlirType type)
Checks whether the given type is an integer type.
MlirStringRef mlirTupleTypeGetName(void)
MlirType mlirFloat6E3M2FNTypeGet(MlirContext ctx)
Creates an f6E3M2FN type in the given context.
MlirTypeID mlirFloat8E4M3TypeGetTypeID()
Returns the typeID of an Float8E4M3 type.
MlirAttribute mlirRankedTensorTypeGetEncoding(MlirType type)
Gets the 'encoding' attribute from the ranked tensor type, returning a null attribute if none.
MlirTypeID mlirFloat8E5M2FNUZTypeGetTypeID()
Returns the typeID of an Float8E5M2FNUZ type.
MlirStringRef mlirFunctionTypeGetName(void)
intptr_t mlirFunctionTypeGetNumInputs(MlirType type)
Returns the number of input types.
bool mlirTypeIsATuple(MlirType type)
Checks whether the given type is a tuple type.
MlirType mlirTupleTypeGet(MlirContext ctx, intptr_t numElements, MlirType const *elements)
Creates a tuple type that consists of the given list of elemental types.
MlirTypeID mlirTupleTypeGetTypeID()
Returns the typeID of an Tuple type.
MlirType mlirVectorTypeGetScalable(intptr_t rank, const int64_t *shape, const bool *scalable, MlirType elementType)
Creates a scalable vector type with the shape identified by its rank and dimensions.
MlirTypeID mlirFloat8E5M3FNUTypeGetTypeID()
Returns the typeID of a Float8E5M3FNU type.
bool mlirTypeIsAFloat8E3M4(MlirType type)
Checks whether the given type is an f8E3M4 type.
MlirTypeID mlirFloat16TypeGetTypeID()
Returns the typeID of an Float16 type.
MlirStringRef mlirFloat8E4M3FNUZTypeGetName(void)
MlirType mlirComplexTypeGet(MlirType elementType)
Creates a complex type with the given element type in the same context as the element type.
MlirTypeID mlirFloat8E5M2TypeGetTypeID()
Returns the typeID of an Float8E5M2 type.
MlirTypeID mlirFloat32TypeGetTypeID()
Returns the typeID of an Float32 type.
bool mlirShapedTypeIsStaticSize(int64_t size)
Checks whether the given shaped type dimension value is statically-sized.
bool mlirTypeIsAFloat8E4M3(MlirType type)
Checks whether the given type is an f8E4M3 type.
int64_t mlirShapedTypeGetRank(MlirType type)
Returns the rank of the given ranked shaped type.
bool mlirTypeIsAFloat8E4M3FN(MlirType type)
Checks whether the given type is an f8E4M3FN type.
bool mlirTypeIsAOpaque(MlirType type)
Checks whether the given type is an opaque type.
MlirStringRef mlirFloat6E3M2FNTypeGetName(void)
bool mlirTypeIsAFloat8E8M0FNU(MlirType type)
Checks whether the given type is an f8E8M0FNU type.
MlirType mlirTupleTypeGetType(MlirType type, intptr_t pos)
Returns the pos-th type in the tuple type.
bool mlirTypeIsATensor(MlirType type)
Checks whether the given type is a Tensor type.
MlirStringRef mlirMemRefTypeGetName(void)
bool mlirIntegerTypeIsSigned(MlirType type)
Checks whether the given integer type is signed.
bool mlirShapedTypeHasStaticShape(MlirType type)
Checks whether the given shaped type has a static shape.
MlirTypeID mlirRankedTensorTypeGetTypeID()
Returns the typeID of an RankedTensor type.
MlirType mlirBF16TypeGet(MlirContext ctx)
Creates a bf16 type in the given context.
MlirType mlirComplexTypeGetElementType(MlirType type)
Returns the element type of the given complex type.
bool mlirTypeIsAFloat6E3M2FN(MlirType type)
Checks whether the given type is an f6E3M2FN type.
bool mlirTypeIsAIndex(MlirType type)
Checks whether the given type is an index type.
bool mlirTypeIsAFloat8E5M2FNUZ(MlirType type)
Checks whether the given type is an f8E5M2FNUZ type.
MlirType mlirOpaqueTypeGet(MlirContext ctx, MlirStringRef dialectNamespace, MlirStringRef typeData)
Creates an opaque type in the given context associated with the dialect identified by its namespace.
MlirAttribute mlirMemRefTypeGetMemorySpace(MlirType type)
Returns the memory space of the given MemRef type.
bool mlirShapedTypeIsStaticStrideOrOffset(int64_t val)
Checks whether the given dimension value of a stride or an offset is statically-sized.
MlirStringRef mlirRankedTensorTypeGetName(void)
MlirType mlirRankedTensorTypeGetChecked(MlirLocation loc, intptr_t rank, const int64_t *shape, MlirType elementType, MlirAttribute encoding)
Same as "mlirRankedTensorTypeGet" but returns a nullptr wrapping MlirType on illegal arguments,...
MlirTypeID mlirFloat8E8M0FNUTypeGetTypeID()
Returns the typeID of an Float8E8M0FNU type.
MlirType mlirVectorTypeGet(intptr_t rank, const int64_t *shape, MlirType elementType)
Creates a vector type of the shape identified by its rank and dimensions, with the given element type...
MlirType mlirMemRefTypeContiguousGet(MlirType elementType, intptr_t rank, const int64_t *shape, MlirAttribute memorySpace)
Creates a MemRef type with the given rank, shape, memory space and element type in the same context a...
MlirStringRef mlirTF32TypeGetName(void)
MlirType mlirFloat4E2M1FNTypeGet(MlirContext ctx)
Creates an f4E2M1FN type in the given context.
MlirStringRef mlirComplexTypeGetName(void)
MlirType mlirFloat8E4M3FNTypeGet(MlirContext ctx)
Creates an f8E4M3FN type in the given context.
MlirStringRef mlirFloat8E4M3B11FNUZTypeGetName(void)
MlirStringRef mlirNoneTypeGetName(void)
MlirStringRef mlirFloat8E4M3FNTypeGetName(void)
MlirType mlirIndexTypeGet(MlirContext ctx)
Creates an index type in the given context.
MlirTypeID mlirVectorTypeGetTypeID()
Returns the typeID of an Vector type.
bool mlirTypeIsARankedTensor(MlirType type)
Checks whether the given type is a ranked tensor type.
MlirTypeID mlirOpaqueTypeGetTypeID()
Returns the typeID of an Opaque type.
MlirTypeID mlirUnrankedMemRefTypeGetTypeID()
Returns the typeID of an UnrankedMemRef type.
MlirStringRef mlirIntegerTypeGetName(void)
bool mlirShapedTypeIsDynamicSize(int64_t size)
Checks whether the given value is used as a placeholder for dynamic sizes in shaped types.
bool mlirTypeIsANone(MlirType type)
Checks whether the given type is a None type.
MlirStringRef mlirOpaqueTypeGetName(void)
MlirType mlirTF32TypeGet(MlirContext ctx)
Creates a TF32 type in the given context.
bool mlirTypeIsAFloat6E2M3FN(MlirType type)
Checks whether the given type is an f6E2M3FN type.
MlirType mlirFloat8E5M2TypeGet(MlirContext ctx)
Creates an f8E5M2 type in the given context.
MlirTypeID mlirFloat4E2M1FNTypeGetTypeID()
Returns the typeID of an Float4E2M1FN type.
unsigned mlirFloatTypeGetWidth(MlirType type)
Returns the bitwidth of a floating-point type.
MlirType mlirUnrankedMemRefTypeGet(MlirType elementType, MlirAttribute memorySpace)
Creates an Unranked MemRef type with the given element type and in the given memory space.
static Type getElementType(Type type)
Determine the element type of type.
static llvm::ArrayRef< CppTy > unwrapList(size_t size, CTy *first, llvm::SmallVectorImpl< CppTy > &storage)
MlirDiagnostic wrap(mlir::Diagnostic &diagnostic)
mlir::Diagnostic & unwrap(MlirDiagnostic diagnostic)
static MlirLogicalResult mlirLogicalResultFailure(void)
Creates a logical result representing a failure.
static MlirLogicalResult mlirLogicalResultSuccess(void)
Creates a logical result representing a success.
Include the generated interface declarations.
Type getType(OpFoldResult ofr)
Returns the int type of the integer in ofr.
A logical result value, essentially a boolean with named states.
A pointer to a sized fragment of a string, not necessarily null-terminated.