executor.await (::catalyst::executor::AwaitOp)

_Wait for one executor.launch_async to finish._

Syntax:

operation ::= `executor.await` $token attr-dict `:` type($token)

Block until the executor.launch_async that produced token has finished. Waiting on the token rather than on the session means other launches on that session are left running.

Operands:

Operand

Description

token

A handle to one launch that has not finished yet.

executor.call (::catalyst::executor::CallOp)

Invoke a symbol in a previously-loaded shared library.

Syntax:

operation ::= `executor.call` $session `(` $symbol `)` `(` $inputs `)` attr-dict
              `:` type($session) `,` functional-type($inputs, $results)

Invoke symbol in a shared library already loaded on the executor session.

The operand list packs input buffers followed by output buffers. num_input_args, when present, marks the boundary: operands [0, num_input_args) are inputs and the remainder are output buffers to be filled by the callee. Without num_input_args all operands are treated as inputs.

Attributes:

AttributeMLIR TypeDescription
symbol::mlir::StringAttrstring attribute
num_input_args::mlir::IntegerAttr32-bit signless integer attribute

Operands:

Operand

Description

session

A handle to an open executor session.

inputs

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

Results:

Result

Description

results

variadic of ranked tensor of any type values

executor.close (::catalyst::executor::CloseOp)

Release a session handle with an executor.

Syntax:

operation ::= `executor.close` $session attr-dict `:` type($session)

Release the session previously established via executor.open, marking the end of its use in the IR.

Operands:

Operand

Description

session

A handle to an open executor session.

executor.launch_async (::catalyst::executor::LaunchAsyncOp)

Dispatch a ``()->()`` entry on the executor without waiting for it.

Syntax:

operation ::= `executor.launch_async` $session `(` $kernel_callee `,` $object `)` attr-dict
              `:` type($session) `->` type($token)

Like executor.launch, but returns as soon as the entry has been started instead of waiting for it to finish; the entry runs on a background thread on the host. Pass the returned token to executor.await to wait for it.

Attributes:

AttributeMLIR TypeDescription
kernel_callee::mlir::StringAttrstring attribute
object::mlir::StringAttrstring attribute

Operands:

Operand

Description

session

A handle to an open executor session.

Results:

Result

Description

token

A handle to one launch that has not finished yet.

executor.launch (::catalyst::executor::LaunchOp)

Dispatch a cross-compiled kernel on the executor and receive its results.

Syntax:

operation ::= `executor.launch` $session `(` $kernel_callee `,` $object `)` `(` $inputs `)` attr-dict
              `:` type($session) `,` functional-type($inputs, $results)

Invoke, on the given session, the kernel previously registered via executor.send_binary. The inputs operand list mirrors the original host-side func.call to the kernel; results mirrors the kernel’s return values.

Attributes:

AttributeMLIR TypeDescription
kernel_callee::mlir::StringAttrstring attribute
object::mlir::StringAttrstring attribute

Operands:

Operand

Description

session

A handle to an open executor session.

inputs

variadic of memref of any type values

Results:

Result

Description

results

variadic of memref of any type values

executor.open (::catalyst::executor::OpenOp)

Open a session with an executor.

Syntax:

operation ::= `executor.open` `(` $address `)` attr-dict `:` type($session)

Establish a connection to the executor reachable at address and return an !executor.session handle identifying it. Subsequent executor operations consume the handle to target this session.

Attributes:

AttributeMLIR TypeDescription
address::mlir::StringAttrstring attribute

Results:

Result

Description

session

A handle to an open executor session.

executor.send_binary (::catalyst::executor::SendBinaryOp)

Ship a compiled kernel object file to the executor.

Syntax:

operation ::= `executor.send_binary` $session `(` $binary_path `)` attr-dict `:` type($session)

Transfer the compiled binary at binary_path over the session to the executor. The executor loads the file and exposes all of its symbols. format selects the wire encoding for the transfer, which is handled by the runtime. Defaults to 0 (the raw object file); other values are reserved for future encodings.

Attributes:

AttributeMLIR TypeDescription
binary_path::mlir::StringAttrstring attribute
format::mlir::IntegerAttr32-bit signless integer attribute

Operands:

Operand

Description

session

A handle to an open executor session.