Beaver.MLIR.Context (beaver v0.4.8)

Copy Markdown

This module defines functions creating or destroying MLIR context.

Summary

Functions

Create a MLIR context. By default it registers and loads all dialects.

Check if the op name is terminator

Run a function with a registry appended to the context.

Types

context_option()

@type context_option() ::
  {:allow_unregistered, boolean()}
  | {:all_dialects, boolean()}
  | {:threading, boolean()}
  | {:thread_pool,
     :application | Beaver.MLIR.LLVMThreadPool.t() | GenServer.server() | nil}
  | {:registry,
     Beaver.MLIR.DialectRegistry.t() | [Beaver.MLIR.DialectRegistry.t()]}

t()

@type t() :: %Beaver.MLIR.Context{
  ref: term(),
  thread_pool_lease: term(),
  thread_pool_owner: term()
}

Functions

allow_unregistered_dialects(ctx, allow \\ true)

create(opts \\ [])

@spec create([context_option()]) :: t()

Create a MLIR context. By default it registers and loads all dialects.

destroy(ctx)

implements_interface?(ctx, op, interface_id)

infer_shaped?(ctx, op)

infer_type?(ctx, op)

make(value)

register_translations(ctx)

terminator?(ctx, op)

Check if the op name is terminator

with_registry(ctx, fun)

Run a function with a registry appended to the context.