‘executor’ Dialect

A dialect for dispatching kernels and calling symbols on an executor.

The executor dialect models the set of operations that describe how a host program interacts with an executor service:

  • Opening a session with an executor endpoint

  • Shipping a cross-compiled kernel object file (or other assets) to that endpoint

  • Dispatching a previously-shipped qnode kernel

  • Invoking an arbitrary symbol in a shared library

Types

SessionType

A handle to an open executor session.

Syntax: !executor.session

A value-semantic handle to a session with an executor endpoint, produced by executor.open and consumed by executor.send_binary, executor.launch, executor.call, and executor.close.

Example:

%s = executor.open("127.0.0.1:9000") : !executor.session
executor.close %s : !executor.session

TokenType

A handle to one launch that has not finished yet.

Syntax: !executor.token

Produced by executor.launch_async and consumed by executor.await, which waits for that one launch.

Example:

%t = executor.launch_async %s("serve", "/tmp/coproc.o")
    : !executor.session -> !executor.token
executor.await %t : !executor.token

Operations

Passes