‘transport’ Dialect¶
A dialect for setting up and driving data-movement in a transport session.
The transport dialect models a connection-oriented data-movement session between two endpoints: creating a session, bringing up the connection, exchanging memory handles, establishing a data path, and running rounds of request/reply traffic until teardown.
This is what a Backline compiles to. A PennyLane
Placement
is serialized into the catalyst.backline module attribute, naming one controller and the
coprocessors it drives; inject-transport-session
reads that attribute and emits the session bring-up and teardown in terms of these ops,
lower-decode-to-transport turns a
decode into a request/reply round over the session, and
convert-transport-to-llvm lowers the
result to __catalyst__transport__* runtime calls. A node here is a Backline participant – a
controller or a coprocessor – and the placement’s transport selects which compiled backend
carries the traffic.
Types¶
SessionType¶
An opaque transport session handle, tagged with its role.
Syntax:
!transport.session<
::catalyst::transport::Role # role
>
Parameters:¶
Parameter |
C++ type |
Description |
|---|---|---|
role |
|
an enum of type Role |
TokenType¶
A handle to an in-flight asynchronous step, awaited with transport.await.
Syntax: !transport.token
Attributes¶
BacklineAttr¶
A backline placement: one controller and the coprocessors it drives.
Syntax:
#transport.backline<
mlir::StringAttr, # transport
::catalyst::transport::NodeAttr, # controller
::llvm::ArrayRef<::catalyst::transport::NodeAttr> # coprocessors
>
Parameters:¶
Parameter |
C++ type |
Description |
|---|---|---|
transport |
|
transport carrying the traffic, selecting the compiled backend |
controller |
|
the controller node that drives the session |
coprocessors |
|
the coprocessor nodes the controller drives |
NodeAttr¶
A backline participant: a controller or a coprocessor.
Syntax:
#transport.node<
mlir::StringAttr, # name
mlir::StringAttr, # peer
mlir::IntegerAttr, # oob_port
mlir::StringAttr, # backend_lib
mlir::StringAttr, # config
mlir::StringAttr, # triple
mlir::StringAttr, # address
mlir::StringAttr, # symbol
mlir::BoolAttr, # out_of_process
mlir::IntegerAttr, # in_bytes
mlir::IntegerAttr, # out_bytes
mlir::IntegerAttr # work_item_idx
>
Parameters:¶
Parameter |
C++ type |
Description |
|---|---|---|
name |
|
this node’s name; the session registry key when non-empty |
peer |
|
the peer’s address for the out-of-band handshake |
oob_port |
|
TCP port for the out-of-band handshake |
backend_lib |
|
backend plugin the runtime dlopens for this node |
config |
|
backend configuration string, passed through verbatim |
triple |
|
target triple this node’s code is compiled for |
address |
|
executor address when this node runs out of process |
symbol |
|
coprocessor function symbol the backend binds |
out_of_process |
|
whether this node’s code is dispatched to an executor rather than run in the compiling process |
in_bytes |
|
request size in bytes for one round |
out_bytes |
|
reply size in bytes for one round |
work_item_idx |
|
index of this node’s work item within the round |
Enums¶
Role¶
Transport session role
Cases:¶
Symbol |
Value |
String |
|---|---|---|
Controller |
|
controller |
Coprocessor |
|
coprocessor |
Operations¶
transport.await(::catalyst::transport::AwaitOp)transport.collect(::catalyst::transport::CollectOp)transport.connect_async(::catalyst::transport::ConnectAsyncOp)transport.connect(::catalyst::transport::ConnectOp)transport.create(::catalyst::transport::CreateOp)transport.destroy(::catalyst::transport::DestroyOp)transport.establish_channel(::catalyst::transport::EstablishChannelOp)transport.exchange_keys_async(::catalyst::transport::ExchangeKeysAsyncOp)transport.exchange_keys(::catalyst::transport::ExchangeKeysOp)transport.get_session(::catalyst::transport::GetSessionOp)transport.last_rtt_ns(::catalyst::transport::LastRttNsOp)transport.post(::catalyst::transport::PostOp)transport.reply_slot(::catalyst::transport::ReplySlotOp)transport.set_coprocessor_fn(::catalyst::transport::SetCoprocessorFnOp)transport.set_message_sizes(::catalyst::transport::SetMessageSizesOp)transport.stage_payload(::catalyst::transport::StagePayloadOp)transport.start(::catalyst::transport::StartOp)transport.stop(::catalyst::transport::StopOp)