Beaver.MLIR.Type (beaver v0.4.0)
This module provides functions to work with MLIR's type system, allowing creation of MLIR type.
Type Categories
Basic Types
Composite Types
- Tensors (
ranked_tensor/2
andunranked_tensor/1
) vector/2
memref/3
function/3
Summary
Types
@type t() :: %Beaver.MLIR.Type{ref: term()}
Functions
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)
Get a vector type creator.
Examples
iex> ctx = MLIR.Context.create()
iex> MLIR.Type.vector([1, 2, 3], MLIR.Type.i32).(ctx) |> MLIR.to_string()
"vector<1x2x3xi32>"
iex> MLIR.Context.destroy(ctx)