Beaver.MLIR.ConversionTarget (beaver v0.4.8)

Copy Markdown

An owning, callback-safe MLIR dialect conversion target.

Static and dynamic legality rules are composed by MLIR. Dynamic callbacks run in the process that registered them while the conversion itself runs on the context's native worker pool.

Summary

Types

legality()

@type legality() :: :legal | :illegal | :no_opinion | boolean()

legality_callback()

@type legality_callback() :: (Beaver.MLIR.Operation.t() -> legality())

t()

@type t() :: %Beaver.MLIR.ConversionTarget{
  ref: term(),
  registration: term(),
  timeout_ms: term()
}

Functions

add_illegal_dialect(target, name)

@spec add_illegal_dialect(t(), String.Chars.t()) :: t()

add_illegal_op(target, name)

@spec add_illegal_op(t(), String.Chars.t()) :: t()

create(context, opts \\ [])

@spec create(
  Beaver.MLIR.Context.t(),
  keyword()
) :: t()

destroy(conversion_target)

@spec destroy(t()) :: :ok

make(value)

mark_recursively_legal(target, name, callback \\ nil)

@spec mark_recursively_legal(t(), String.Chars.t(), legality_callback() | nil) :: t()

mark_unknown_dynamically_legal(target, callback)

@spec mark_unknown_dynamically_legal(t(), legality_callback()) :: t()

with(ctx, opts \\ [], fun)

@spec with(Beaver.MLIR.Context.t(), keyword(), (t() -> result)) :: result
when result: var