catalyst.assert (::catalyst::AssertionOp)

Asserts condition at runtime.

Attributes:

AttributeMLIR TypeDescription
error::mlir::StringAttrstring attribute

Operands:

Operand

Description

assertion

1-bit signless integer

catalyst.callback_call (::catalyst::CallbackCallOp)

Syntax:

operation ::= `catalyst.callback_call` $callee `(` $inputs `)` attr-dict `:` functional-type($inputs, results)

Interfaces: CallOpInterface, MemoryEffectOpInterface, SymbolUserOpInterface

Attributes:

AttributeMLIR TypeDescription
callee::mlir::FlatSymbolRefAttrflat symbol reference attribute
arg_attrs::mlir::ArrayAttrArray of dictionary attributes
res_attrs::mlir::ArrayAttrArray of dictionary attributes

Operands:

Operand

Description

inputs

variadic of ranked tensor of any type values or memref of any type values

Results:

Result

Description

«unnamed»

variadic of any type

catalyst.callback (::catalyst::CallbackOp)

Operation denoting a symbol to refer to user callbacks.

This is an operation that is intended to be placed at the module level. It corresponds to function bodies that are not yet constructed.

Traits: IsolatedFromAbove

Interfaces: CallableOpInterface, FunctionOpInterface, Symbol

Attributes:

AttributeMLIR TypeDescription
sym_name::mlir::StringAttrstring attribute
function_type::mlir::TypeAttrtype attribute of function type
id::mlir::IntegerAttr64-bit signless integer attribute
argc::mlir::IntegerAttr64-bit signless integer attribute
resc::mlir::IntegerAttr64-bit signless integer attribute
arg_attrs::mlir::ArrayAttrArray of dictionary attributes
res_attrs::mlir::ArrayAttrArray of dictionary attributes

catalyst.custom_call (::catalyst::CustomCallOp)

CustomCall operation

Syntax:

operation ::= `catalyst.custom_call` `fn` `(`$call_target_name`)` `(` $inputs `)`
              attr-dict `:` functional-type(operands, results)

Encapsulates an implementation-defined operation call_target_name that takes inputs and and produces results.

A custom call invokes code external to Catalyst. The inputs are passed to the external code, and the external code is expected to produce a result of the given type.

Interfaces: MemoryEffectOpInterface

Attributes:

AttributeMLIR TypeDescription
call_target_name::mlir::StringAttrstring attribute
number_original_arg::mlir::DenseI32ArrayAttri32 dense array attribute

Operands:

Operand

Description

inputs

variadic of any type

Results:

Result

Description

«unnamed»

variadic of any type

catalyst.launch_kernel (::catalyst::LaunchKernelOp)

Syntax:

operation ::= `catalyst.launch_kernel` $callee `(` $inputs `)` attr-dict `:` functional-type($inputs, results)

Interfaces: CallOpInterface, SymbolUserOpInterface

Attributes:

AttributeMLIR TypeDescription
callee::mlir::SymbolRefAttrsymbol reference attribute
arg_attrs::mlir::ArrayAttrArray of dictionary attributes
res_attrs::mlir::ArrayAttrArray of dictionary attributes

Operands:

Operand

Description

inputs

variadic of ranked tensor of any type values or memref of any type values

Results:

Result

Description

«unnamed»

variadic of any type

catalyst.list_dealloc (::catalyst::ListDeallocOp)

Deallocate the underlying memory of an arraylist.

Syntax:

operation ::= `catalyst.list_dealloc` $list attr-dict `:` type($list)

Operands:

Operand

Description

list

a dynamically resizable array

catalyst.list_init (::catalyst::ListInitOp)

Initialize a dynamically resizable arraylist.

Syntax:

operation ::= `catalyst.list_init` attr-dict `:` type($list)

Results:

Result

Description

list

a dynamically resizable array

catalyst.list_load_data (::catalyst::ListLoadDataOp)

Get the underlying memref storing the data of an array list.

Syntax:

operation ::= `catalyst.list_load_data` $list attr-dict `:` type($list) `->` type($data)

Operands:

Operand

Description

list

a dynamically resizable array

Results:

Result

Description

data

memref of any type values

catalyst.list_pop (::catalyst::ListPopOp)

Remove an element from the end of an array list and return it.

Syntax:

operation ::= `catalyst.list_pop` $list attr-dict `:` type($list)

Interfaces: InferTypeOpInterface

Operands:

Operand

Description

list

a dynamically resizable array

Results:

Result

Description

result

any type

catalyst.list_push (::catalyst::ListPushOp)

Append an element to the end of an array list.

Syntax:

operation ::= `catalyst.list_push` $value `,` $list attr-dict `:` type($list)

Operands:

Operand

Description

value

any type

list

a dynamically resizable array

catalyst.print (::catalyst::PrintOp)

Prints numeric values or constant strings at runtime.

Attributes:

AttributeMLIR TypeDescription
const_val::mlir::StringAttrstring attribute
print_descriptor::mlir::UnitAttrunit attribute

Operands:

Operand

Description

val

any type