Beaver.MLIR.Type (beaver v0.2.15)

This module defines functions working with MLIR Type.

Link to this section Summary

Link to this section Types

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

Link to this section Functions

Link to this function

complex(element_type)

Link to this function

f16(opts \\ [])

Link to this function

f32(opts \\ [])

Link to this function

f64(opts \\ [])

Link to this function

f(bitwidth, opts \\ [])

Link to this function

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

Link to this function

get(string, opts \\ [])

Link to this function

i16(opts \\ [])

Link to this function

i32(opts \\ [])

Link to this function

i64(opts \\ [])

Link to this function

i128(opts \\ [])

Link to this function

i(bitwidth, opts \\ [])

See Beaver.MLIR.Type.integer/2.

Link to this function

index(opts \\ [])

Link to this function

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

Link to this function

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

Link to this function

ranked_tensor(shape, element_type, encoding \\ nil)

Link to this function

tuple(elements, opts \\ [])

Get a tuple type.

examples

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> ctx |> MLIR.Context.destroy
Link to this function

unranked_tensor(element_type)

Link to this function

vector(shape, element_type)

Get a vector type creator.

examples

Examples

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