‘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

::catalyst::transport::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

mlir::StringAttr

transport carrying the traffic, selecting the compiled backend

controller

::catalyst::transport::NodeAttr

the controller node that drives the session

coprocessors

::llvm::ArrayRef<::catalyst::transport::NodeAttr>

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

mlir::StringAttr

this node’s name; the session registry key when non-empty

peer

mlir::StringAttr

the peer’s address for the out-of-band handshake

oob_port

mlir::IntegerAttr

TCP port for the out-of-band handshake

backend_lib

mlir::StringAttr

backend plugin the runtime dlopens for this node

config

mlir::StringAttr

backend configuration string, passed through verbatim

triple

mlir::StringAttr

target triple this node’s code is compiled for

address

mlir::StringAttr

executor address when this node runs out of process

symbol

mlir::StringAttr

coprocessor function symbol the backend binds

out_of_process

mlir::BoolAttr

whether this node’s code is dispatched to an executor rather than run in the compiling process

in_bytes

mlir::IntegerAttr

request size in bytes for one round

out_bytes

mlir::IntegerAttr

reply size in bytes for one round

work_item_idx

mlir::IntegerAttr

index of this node’s work item within the round

Enums

Role

Transport session role

Cases:

Symbol

Value

String

Controller

0

controller

Coprocessor

1

coprocessor

Operations

Passes