Beaver.MLIR.ExecutionEngine (beaver v0.4.0)

This module defines functions working with MLIR ExecutionEngine.

Summary

Functions

Create a MLIR JIT engine for a module and check if successful. Usually this module should be of LLVM dialect.

Types

dirty()

@type dirty() :: nil | :io_bound | :cpu_bound

invoke_opts()

@type invoke_opts() :: [{:dirty, dirty()}]

object_dump()

@type object_dump() :: boolean()

opt_level()

@type opt_level() :: 0 | 1 | 2 | 3

opts()

@type opts() :: [
  shared_lib_paths: [shared_lib_path()],
  opt_level: opt_level(),
  object_dump: object_dump()
]

shared_lib_path()

@type shared_lib_path() :: String.t()

t()

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

Functions

create!(composer_or_op)

Create a MLIR JIT engine for a module and check if successful. Usually this module should be of LLVM dialect.

create!(module, opts \\ [])

@spec create!(Beaver.MLIR.Module.t(), opts()) :: t()

destroy(jit)

invoke!(jit, symbol, args \\ [], return \\ nil, opts \\ [])

@spec invoke!(
  t(),
  String.t() | Beaver.MLIR.StringRef.t(),
  list(),
  any(),
  invoke_opts()
) :: :ok

invoke a function by symbol name.

make(value)