Beaver.Slang behaviour (beaver v0.3.8)

Defining a MLIR dialect with macros in Elixir. Internally expressions are compiled to IRDL

Summary

Functions

This macro is invoked when the module is used. It sets up the module by registering attributes and importing macros from Beaver.Slang.

This macro generates the AST for the irdl.any op.

This macro generates the AST for the any_of attribute in the dialect.

This macro defines an alias for a lengthy type. It generates the AST for the alias function.

This macro defines a attribute in the dialect.

This macro defines an operation in the dialect. It generates the AST for the creator function for the operation.

This macro defines a type in the dialect.

This macro generates the AST for irdl.is op, usually used to create a constraint on type

This function loads the MLIR dialect into the MLIR context. It invokes the internal function of the provided module to create the dialect's IRDL module and performs additional MLIR transformations and verification.

Callbacks

Link to this callback

__slang_dialect__(ctx)

@callback __slang_dialect__(ctx :: Beaver.MLIR.Context.t()) :: :ok | {:error, String.t()}

Functions

Link to this macro

__using__(opts)

(macro)

This macro is invoked when the module is used. It sets up the module by registering attributes and importing macros from Beaver.Slang.

Link to this macro

any()

(macro)

This macro generates the AST for the irdl.any op.

Link to this macro

any_of(types)

(macro)

This macro generates the AST for the any_of attribute in the dialect.

Link to this macro

defalias(call, block)

(macro)

This macro defines an alias for a lengthy type. It generates the AST for the alias function.

Link to this macro

defattr(call)

(macro)

This macro defines a attribute in the dialect.

Link to this macro

defop(call, block \\ nil)

(macro)

This macro defines an operation in the dialect. It generates the AST for the creator function for the operation.

Link to this macro

deftype(call)

(macro)

This macro defines a type in the dialect.

Link to this macro

is(type)

(macro)

This macro generates the AST for irdl.is op, usually used to create a constraint on type

This function loads the MLIR dialect into the MLIR context. It invokes the internal function of the provided module to create the dialect's IRDL module and performs additional MLIR transformations and verification.