Beaver.MLIR.Type (beaver v0.4.4)

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 a any_quantized type.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

calls Beaver.MLIR.CAPI.mlirTypeIsAShaped/1 to check if it is a 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 a tensor type.

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

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

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

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

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

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

Get a tuple type.

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

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

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

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

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

calls Beaver.MLIR.CAPI.mlirTypeIsAUnrankedTensor/1 to check if it is a unranked_tensor 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 a 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 a any_quantized 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 a bf16 type.

calibrated_quantized?(t)

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

complex(element_type)

complex?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAComplex/1 to check if it is a 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 a emit_c_array type.

emit_c_opaque?(t)

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

emit_c_pointer(opts \\ [])

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

emit_c_pointer?(t)

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

emit_c_ptr_diff_t(opts \\ [])

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

emit_c_ptr_diff_t?(t)

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

emit_c_signed_size_t(opts \\ [])

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

emit_c_signed_size_t?(t)

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

emit_c_size_t(opts \\ [])

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

emit_c_size_t?(t)

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

emit_cl_value(opts \\ [])

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

emit_cl_value?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAEmitCLValueType/1 to check if it is a emit_cl_value 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 a 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 a 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 a f64 type.

f(bitwidth, opts \\ [])

See Beaver.MLIR.Type.float/2.

float4_e2_m1_fn(opts \\ [])

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

float4_e2_m1_fn?(t)

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

float6_e2_m3_fn(opts \\ [])

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

float6_e2_m3_fn?(t)

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

float6_e3_m2_fn(opts \\ [])

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

float6_e3_m2_fn?(t)

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

float8_e3_m4(opts \\ [])

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

float8_e3_m4?(t)

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

float8_e4_m3(opts \\ [])

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

float8_e4_m3?(t)

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

float8_e4_m3_b11_fnuz(opts \\ [])

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

float8_e4_m3_b11_fnuz?(t)

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

float8_e4_m3_fn(opts \\ [])

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

float8_e4_m3_fn?(t)

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

float8_e4_m3_fnuz(opts \\ [])

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

float8_e4_m3_fnuz?(t)

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

float8_e5_m2(opts \\ [])

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

float8_e5_m2?(t)

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

float8_e5_m2_fnuz(opts \\ [])

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

float8_e5_m2_fnuz?(t)

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

float8_e8_m0_fnu(opts \\ [])

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

float8_e8_m0_fnu?(t)

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

float(bitwidth, opts \\ [])

float?(t)

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

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

function?(t)

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

get(string, opts \\ [])

gpu_async_token(opts \\ [])

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

gpu_async_token?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAGPUAsyncTokenType/1 to check if it is a gpu_async_token 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 a index type.

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

integer?(t)

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

llvm_pointer?(t)

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

llvm_struct?(t)

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

llvm_void(opts \\ [])

calls Beaver.MLIR.CAPI.mlirLLVMVoidTypeGet/1 to get llvm_void 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 a 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 a none type.

nvgpu_tensor_map_descriptor?(t)

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

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

opaque?(t)

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

pdl?(t)

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

pdl_attribute(opts \\ [])

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

pdl_attribute?(t)

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

pdl_operation(opts \\ [])

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

pdl_operation?(t)

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

pdl_range(opts \\ [])

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

pdl_range?(t)

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

pdl_type(opts \\ [])

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

pdl_type?(t)

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

pdl_value(opts \\ [])

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

pdl_value?(t)

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

quantized?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAQuantizedType/1 to check if it is a 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 a ranked_tensor type.

shaped?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAShaped/1 to check if it is a 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 a 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 a tf32 type.

transform_any_op(opts \\ [])

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

transform_any_op?(t)

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

transform_any_param(opts \\ [])

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

transform_any_param?(t)

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

transform_any_value(opts \\ [])

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

transform_any_value?(t)

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

transform_operation?(t)

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

transform_param?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsATransformParamType/1 to check if it is a transform_param 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 a 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 a uniform_quantized type.

uniform_quantized_per_axis?(t)

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

uniform_quantized_sub_channel?(t)

calls Beaver.MLIR.CAPI.mlirTypeIsAUniformQuantizedSubChannelType/1 to check if it is a uniform_quantized_sub_channel 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 a unranked_memref 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 a unranked_tensor 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 a vector type.

width(type)

get the width of the int or float type