Beaver.MLIR.Type (beaver v0.4.6)

This module provides functions to work with MLIR's type system, allowing creation of MLIR type.

Type Categories

Basic Types

Composite Types

Summary

Functions

calls Beaver.MLIR.CAPI.mlirTypeIsAAnyQuantizedType/1 to check if it is AnyQuantized type.

calls Beaver.MLIR.CAPI.mlirTypeIsABF16/1 to check if it is BF16 type.

calls Beaver.MLIR.CAPI.mlirTypeIsACalibratedQuantizedType/1 to check if it is CalibratedQuantized type.

calls Beaver.MLIR.CAPI.mlirTypeIsAComplex/1 to check if it is Complex type.

calls Beaver.MLIR.CAPI.mlirTypeIsAEmitCArrayType/1 to check if it is EmitCArray type.

calls Beaver.MLIR.CAPI.mlirTypeIsAEmitCOpaqueType/1 to check if it is EmitCOpaque type.

calls Beaver.MLIR.CAPI.mlirTypeIsAEmitCPointerType/1 to check if it is EmitCPointer type.

calls Beaver.MLIR.CAPI.mlirTypeIsAEmitCPtrDiffTType/1 to check if it is EmitCPtrDiffT type.

calls Beaver.MLIR.CAPI.mlirTypeIsAEmitCSignedSizeTType/1 to check if it is EmitCSignedSizeT type.

calls Beaver.MLIR.CAPI.mlirTypeIsAEmitCSizeTType/1 to check if it is EmitCSizeT type.

calls Beaver.MLIR.CAPI.mlirTypeIsAEmitCLValueType/1 to check if it is EmitCLValue type.

calls Beaver.MLIR.CAPI.mlirTypeIsAF16/1 to check if it is F16 type.

calls Beaver.MLIR.CAPI.mlirTypeIsAF32/1 to check if it is F32 type.

calls Beaver.MLIR.CAPI.mlirTypeIsAF64/1 to check if it is F64 type.

calls Beaver.MLIR.CAPI.mlirTypeIsAFloat4E2M1FN/1 to check if it is Float4E2M1FN type.

calls Beaver.MLIR.CAPI.mlirTypeIsAFloat6E2M3FN/1 to check if it is Float6E2M3FN type.

calls Beaver.MLIR.CAPI.mlirTypeIsAFloat6E3M2FN/1 to check if it is Float6E3M2FN type.

calls Beaver.MLIR.CAPI.mlirTypeIsAFloat8E3M4/1 to check if it is Float8E3M4 type.

calls Beaver.MLIR.CAPI.mlirTypeIsAFloat8E4M3/1 to check if it is Float8E4M3 type.

calls Beaver.MLIR.CAPI.mlirTypeIsAFloat8E4M3B11FNUZ/1 to check if it is Float8E4M3B11FNUZ type.

calls Beaver.MLIR.CAPI.mlirTypeIsAFloat8E4M3FN/1 to check if it is Float8E4M3FN type.

calls Beaver.MLIR.CAPI.mlirTypeIsAFloat8E4M3FNUZ/1 to check if it is Float8E4M3FNUZ type.

calls Beaver.MLIR.CAPI.mlirTypeIsAFloat8E5M2/1 to check if it is Float8E5M2 type.

calls Beaver.MLIR.CAPI.mlirTypeIsAFloat8E5M2FNUZ/1 to check if it is Float8E5M2FNUZ type.

calls Beaver.MLIR.CAPI.mlirTypeIsAFloat8E8M0FNU/1 to check if it is Float8E8M0FNU type.

calls Beaver.MLIR.CAPI.mlirTypeIsAFloat/1 to check if it is Float type.

calls Beaver.MLIR.CAPI.mlirTypeIsAFunction/1 to check if it is Function type.

calls Beaver.MLIR.CAPI.mlirTypeIsAGPUAsyncTokenType/1 to check if it is GPUAsyncToken type.

calls Beaver.MLIR.CAPI.mlirTypeIsAIndex/1 to check if it is Index type.

calls Beaver.MLIR.CAPI.mlirTypeIsAInteger/1 to check if it is Integer type.

calls Beaver.MLIR.CAPI.mlirTypeIsALLVMPointerType/1 to check if it is LLVMPointer type.

calls Beaver.MLIR.CAPI.mlirTypeIsALLVMStructType/1 to check if it is LLVMStruct type.

calls Beaver.MLIR.CAPI.mlirTypeIsAMemRef/1 to check if it is MemRef type.

calls Beaver.MLIR.CAPI.mlirTypeIsANone/1 to check if it is None type.

calls Beaver.MLIR.CAPI.mlirTypeIsAOpaque/1 to check if it is Opaque type.

calls Beaver.MLIR.CAPI.mlirTypeIsAPDLType/1 to check if it is PDL type.

calls Beaver.MLIR.CAPI.mlirTypeIsAPDLAttributeType/1 to check if it is PDLAttribute type.

calls Beaver.MLIR.CAPI.mlirTypeIsAPDLOperationType/1 to check if it is PDLOperation type.

calls Beaver.MLIR.CAPI.mlirTypeIsAPDLRangeType/1 to check if it is PDLRange type.

calls Beaver.MLIR.CAPI.mlirTypeIsAPDLTypeType/1 to check if it is PDLType type.

calls Beaver.MLIR.CAPI.mlirTypeIsAPDLValueType/1 to check if it is PDLValue type.

calls Beaver.MLIR.CAPI.mlirTypeIsAQuantizedType/1 to check if it is Quantized type.

calls Beaver.MLIR.CAPI.mlirTypeIsARankedTensor/1 to check if it is RankedTensor type.

calls Beaver.MLIR.CAPI.mlirTypeIsAShaped/1 to check if it is Shaped type.

calls Beaver.MLIR.CAPI.mlirIntegerTypeIsSigned/1 to check if it is a signed integer.

calls Beaver.MLIR.CAPI.mlirIntegerTypeIsSignless/1 to check if it is a signless integer.

calls Beaver.MLIR.CAPI.mlirTypeIsATensor/1 to check if it is Tensor type.

calls Beaver.MLIR.CAPI.mlirTypeIsATF32/1 to check if it is TF32 type.

calls Beaver.MLIR.CAPI.mlirTypeIsATransformAnyOpType/1 to check if it is TransformAnyOp type.

calls Beaver.MLIR.CAPI.mlirTypeIsATransformAnyParamType/1 to check if it is TransformAnyParam type.

calls Beaver.MLIR.CAPI.mlirTypeIsATransformAnyValueType/1 to check if it is TransformAnyValue type.

calls Beaver.MLIR.CAPI.mlirTypeIsATransformOperationType/1 to check if it is TransformOperation type.

calls Beaver.MLIR.CAPI.mlirTypeIsATransformParamType/1 to check if it is TransformParam type.

Get a tuple type.

calls Beaver.MLIR.CAPI.mlirTypeIsATuple/1 to check if it is Tuple type.

calls Beaver.MLIR.CAPI.mlirTypeIsAUniformQuantizedType/1 to check if it is UniformQuantized type.

calls Beaver.MLIR.CAPI.mlirTypeIsAUnrankedMemRef/1 to check if it is UnrankedMemRef type.

calls Beaver.MLIR.CAPI.mlirTypeIsAUnrankedTensor/1 to check if it is UnrankedTensor type.

calls Beaver.MLIR.CAPI.mlirIntegerTypeIsUnsigned/1 to check if it is a unsigned integer.

Get a vector type creator.

calls Beaver.MLIR.CAPI.mlirTypeIsAVector/1 to check if it is Vector type.

get the width of the int or float type

Types

t()

@type t() :: %Beaver.MLIR.Type{ref: term()}

Functions

any_quantized?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAAnyQuantizedType/1 to check if it is AnyQuantized type.

bf16(opts \\ [])

calls Beaver.MLIR.CAPI.mlirBF16TypeGet/1 to get BF16 type

bf16?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsABF16/1 to check if it is BF16 type.

calibrated_quantized?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsACalibratedQuantizedType/1 to check if it is CalibratedQuantized type.

complex(element_type)

complex?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAComplex/1 to check if it is Complex type.

element_type(shaped_type)

See Beaver.MLIR.CAPI.mlirShapedTypeGetElementType/1.

emit_c_array?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAEmitCArrayType/1 to check if it is EmitCArray type.

emit_c_opaque?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAEmitCOpaqueType/1 to check if it is EmitCOpaque type.

emit_c_pointer(opts \\ [])

calls Beaver.MLIR.CAPI.mlirEmitCPointerTypeGet/1 to get EmitCPointer type

emit_c_pointer?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAEmitCPointerType/1 to check if it is EmitCPointer type.

emit_c_ptr_diff_t(opts \\ [])

calls Beaver.MLIR.CAPI.mlirEmitCPtrDiffTTypeGet/1 to get EmitCPtrDiffT type

emit_c_ptr_diff_t?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAEmitCPtrDiffTType/1 to check if it is EmitCPtrDiffT type.

emit_c_signed_size_t(opts \\ [])

calls Beaver.MLIR.CAPI.mlirEmitCSignedSizeTTypeGet/1 to get EmitCSignedSizeT type

emit_c_signed_size_t?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAEmitCSignedSizeTType/1 to check if it is EmitCSignedSizeT type.

emit_c_size_t(opts \\ [])

calls Beaver.MLIR.CAPI.mlirEmitCSizeTTypeGet/1 to get EmitCSizeT type

emit_c_size_t?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAEmitCSizeTType/1 to check if it is EmitCSizeT type.

emit_cl_value(opts \\ [])

calls Beaver.MLIR.CAPI.mlirEmitCLValueTypeGet/1 to get EmitCLValue type

emit_cl_value?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAEmitCLValueType/1 to check if it is EmitCLValue type.

f16(opts \\ [])

calls Beaver.MLIR.CAPI.mlirF16TypeGet/1 to get F16 type

f16?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAF16/1 to check if it is F16 type.

f32(opts \\ [])

calls Beaver.MLIR.CAPI.mlirF32TypeGet/1 to get F32 type

f32?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAF32/1 to check if it is F32 type.

f64(opts \\ [])

calls Beaver.MLIR.CAPI.mlirF64TypeGet/1 to get F64 type

f64?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAF64/1 to check if it is F64 type.

f(bitwidth, opts \\ [])

See Beaver.MLIR.Type.float/2.

float4_e2_m1_fn(opts \\ [])

calls Beaver.MLIR.CAPI.mlirFloat4E2M1FNTypeGet/1 to get Float4E2M1FN type

float4_e2_m1_fn?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAFloat4E2M1FN/1 to check if it is Float4E2M1FN type.

float6_e2_m3_fn(opts \\ [])

calls Beaver.MLIR.CAPI.mlirFloat6E2M3FNTypeGet/1 to get Float6E2M3FN type

float6_e2_m3_fn?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAFloat6E2M3FN/1 to check if it is Float6E2M3FN type.

float6_e3_m2_fn(opts \\ [])

calls Beaver.MLIR.CAPI.mlirFloat6E3M2FNTypeGet/1 to get Float6E3M2FN type

float6_e3_m2_fn?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAFloat6E3M2FN/1 to check if it is Float6E3M2FN type.

float8_e3_m4(opts \\ [])

calls Beaver.MLIR.CAPI.mlirFloat8E3M4TypeGet/1 to get Float8E3M4 type

float8_e3_m4?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAFloat8E3M4/1 to check if it is Float8E3M4 type.

float8_e4_m3(opts \\ [])

calls Beaver.MLIR.CAPI.mlirFloat8E4M3TypeGet/1 to get Float8E4M3 type

float8_e4_m3?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAFloat8E4M3/1 to check if it is Float8E4M3 type.

float8_e4_m3_b11_fnuz(opts \\ [])

calls Beaver.MLIR.CAPI.mlirFloat8E4M3B11FNUZTypeGet/1 to get Float8E4M3B11FNUZ type

float8_e4_m3_b11_fnuz?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAFloat8E4M3B11FNUZ/1 to check if it is Float8E4M3B11FNUZ type.

float8_e4_m3_fn(opts \\ [])

calls Beaver.MLIR.CAPI.mlirFloat8E4M3FNTypeGet/1 to get Float8E4M3FN type

float8_e4_m3_fn?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAFloat8E4M3FN/1 to check if it is Float8E4M3FN type.

float8_e4_m3_fnuz(opts \\ [])

calls Beaver.MLIR.CAPI.mlirFloat8E4M3FNUZTypeGet/1 to get Float8E4M3FNUZ type

float8_e4_m3_fnuz?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAFloat8E4M3FNUZ/1 to check if it is Float8E4M3FNUZ type.

float8_e5_m2(opts \\ [])

calls Beaver.MLIR.CAPI.mlirFloat8E5M2TypeGet/1 to get Float8E5M2 type

float8_e5_m2?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAFloat8E5M2/1 to check if it is Float8E5M2 type.

float8_e5_m2_fnuz(opts \\ [])

calls Beaver.MLIR.CAPI.mlirFloat8E5M2FNUZTypeGet/1 to get Float8E5M2FNUZ type

float8_e5_m2_fnuz?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAFloat8E5M2FNUZ/1 to check if it is Float8E5M2FNUZ type.

float8_e8_m0_fnu(opts \\ [])

calls Beaver.MLIR.CAPI.mlirFloat8E8M0FNUTypeGet/1 to get Float8E8M0FNU type

float8_e8_m0_fnu?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAFloat8E8M0FNU/1 to check if it is Float8E8M0FNU type.

float(bitwidth, opts \\ [])

float?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAFloat/1 to check if it is Float type.

function(inputs, results, opts \\ [])

function?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAFunction/1 to check if it is Function type.

get(string, opts \\ [])

gpu_async_token(opts \\ [])

calls Beaver.MLIR.CAPI.mlirGPUAsyncTokenTypeGet/1 to get GPUAsyncToken type

gpu_async_token?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAGPUAsyncTokenType/1 to check if it is GPUAsyncToken type.

i1(opts \\ [])

i8(opts \\ [])

i16(opts \\ [])

i32(opts \\ [])

i64(opts \\ [])

i128(opts \\ [])

i(bitwidth, opts \\ [])

See Beaver.MLIR.Type.integer/2.

index(opts \\ [])

calls Beaver.MLIR.CAPI.mlirIndexTypeGet/1 to get Index type

index?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAIndex/1 to check if it is Index type.

integer(bitwidth, opts \\ [signed: false])

integer?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAInteger/1 to check if it is Integer type.

llvm_pointer?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsALLVMPointerType/1 to check if it is LLVMPointer type.

llvm_struct?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsALLVMStructType/1 to check if it is LLVMStruct type.

llvm_void(opts \\ [])

calls Beaver.MLIR.CAPI.mlirLLVMVoidTypeGet/1 to get LLVMVoid type

make(value)

memref(shape, element_type, opts \\ [layout: nil, memory_space: nil])

memref!(shape, element_type, opts \\ [])

memref?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAMemRef/1 to check if it is MemRef type.

none(opts \\ [])

calls Beaver.MLIR.CAPI.mlirNoneTypeGet/1 to get None type

none?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsANone/1 to check if it is None type.

nvgpu_tensor_map_descriptor?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsANVGPUTensorMapDescriptorType/1 to check if it is NVGPUTensorMapDescriptor type.

opaque(dialect_namespace, type_data, opts \\ [])

opaque?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAOpaque/1 to check if it is Opaque type.

pdl?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAPDLType/1 to check if it is PDL type.

pdl_attribute(opts \\ [])

calls Beaver.MLIR.CAPI.mlirPDLAttributeTypeGet/1 to get PDLAttribute type

pdl_attribute?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAPDLAttributeType/1 to check if it is PDLAttribute type.

pdl_operation(opts \\ [])

calls Beaver.MLIR.CAPI.mlirPDLOperationTypeGet/1 to get PDLOperation type

pdl_operation?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAPDLOperationType/1 to check if it is PDLOperation type.

pdl_range(opts \\ [])

calls Beaver.MLIR.CAPI.mlirPDLRangeTypeGet/1 to get PDLRange type

pdl_range?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAPDLRangeType/1 to check if it is PDLRange type.

pdl_type(opts \\ [])

calls Beaver.MLIR.CAPI.mlirPDLTypeTypeGet/1 to get PDLType type

pdl_type?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAPDLTypeType/1 to check if it is PDLType type.

pdl_value(opts \\ [])

calls Beaver.MLIR.CAPI.mlirPDLValueTypeGet/1 to get PDLValue type

pdl_value?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAPDLValueType/1 to check if it is PDLValue type.

quantized?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAQuantizedType/1 to check if it is Quantized type.

ranked_tensor(shape, element_type, opts \\ [])

ranked_tensor!(shape, element_type, opts \\ [])

ranked_tensor?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsARankedTensor/1 to check if it is RankedTensor type.

shaped?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAShaped/1 to check if it is Shaped type.

si1(opts \\ [])

si8(opts \\ [])

si16(opts \\ [])

si32(opts \\ [])

si64(opts \\ [])

si128(opts \\ [])

signed?(type)

calls Beaver.MLIR.CAPI.mlirIntegerTypeIsSigned/1 to check if it is a signed integer.

signless?(type)

calls Beaver.MLIR.CAPI.mlirIntegerTypeIsSignless/1 to check if it is a signless integer.

tensor?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsATensor/1 to check if it is Tensor type.

tf32(opts \\ [])

calls Beaver.MLIR.CAPI.mlirTF32TypeGet/1 to get TF32 type

tf32?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsATF32/1 to check if it is TF32 type.

transform_any_op(opts \\ [])

calls Beaver.MLIR.CAPI.mlirTransformAnyOpTypeGet/1 to get TransformAnyOp type

transform_any_op?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsATransformAnyOpType/1 to check if it is TransformAnyOp type.

transform_any_param(opts \\ [])

calls Beaver.MLIR.CAPI.mlirTransformAnyParamTypeGet/1 to get TransformAnyParam type

transform_any_param?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsATransformAnyParamType/1 to check if it is TransformAnyParam type.

transform_any_value(opts \\ [])

calls Beaver.MLIR.CAPI.mlirTransformAnyValueTypeGet/1 to get TransformAnyValue type

transform_any_value?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsATransformAnyValueType/1 to check if it is TransformAnyValue type.

transform_operation?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsATransformOperationType/1 to check if it is TransformOperation type.

transform_param?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsATransformParamType/1 to check if it is TransformParam type.

tuple(elements, opts \\ [])

Get a tuple type.

Examples

iex> ctx = MLIR.Context.create()
iex> MLIR.Type.tuple([MLIR.Type.i32, MLIR.Type.i32], ctx: ctx) |> MLIR.to_string()
"tuple<i32, i32>"
iex> MLIR.Context.destroy(ctx)

tuple?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsATuple/1 to check if it is Tuple type.

ui1(opts \\ [])

ui8(opts \\ [])

ui16(opts \\ [])

ui32(opts \\ [])

ui64(opts \\ [])

ui128(opts \\ [])

uniform_quantized?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAUniformQuantizedType/1 to check if it is UniformQuantized type.

uniform_quantized_per_axis?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAUniformQuantizedPerAxisType/1 to check if it is UniformQuantizedPerAxis type.

uniform_quantized_sub_channel?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAUniformQuantizedSubChannelType/1 to check if it is UniformQuantizedSubChannel type.

unranked_memref(element_type, opts \\ [])

unranked_memref!(element_type, opts \\ [])

unranked_memref?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAUnrankedMemRef/1 to check if it is UnrankedMemRef type.

unranked_tensor(element_type, opts \\ [])

unranked_tensor!(element_type, opts \\ [])

unranked_tensor?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAUnrankedTensor/1 to check if it is UnrankedTensor type.

unsigned?(type)

calls Beaver.MLIR.CAPI.mlirIntegerTypeIsUnsigned/1 to check if it is a unsigned integer.

vector(shape, element_type, opts \\ [])

Get a vector type creator.

Examples

iex> ctx = MLIR.Context.create()
iex> MLIR.Type.vector!([1, 2, 3], MLIR.Type.i32(ctx: ctx)) |> MLIR.to_string()
"vector<1x2x3xi32>"
iex> MLIR.Context.destroy(ctx)

vector!(shape, element_type, opts \\ [])

vector?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAVector/1 to check if it is Vector type.

width(type)

get the width of the int or float type