You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
authored
Add inject-transport-session pass to emit transport session IR (#3063)
**Context:**
Backline places a QNode's controller and its coprocessors on separate
executors that talk over a transport. The placement is serialized onto
the module as the catalyst.backline attribute (controller + coprocessors
+ per-node backend/peer/triple/data-path info). This pass turns that
declarative attribute into the concrete transport-dialect session
lifecycle, wired into the setup/teardown functions the runtime already
calls around every execution.
**Description of the Change:**
Reading `catalyst.backline,` the pass injects, per session:
bring-up into `@setup`: `transport.create` → `connect` → `exchange_keys`
→ `establish_channel` → `commit_work_item` (controller) /
`set_coprocessor_fn` (coprocessor) → start
tear-down into `@teardown`: `get_session` → `stop` → `destroy`
Topologies handled:
- Controller-only: single controller session, straight-line
bring-up/teardown.
- Local coprocessors: controller + coprocessor sessions created together
in the host @setup; the coprocessor's `connect/exchange_keys` run async
so the two ends handshake concurrently.
- Remote coprocessors: each coprocessor's ops go into a generated
`module_coproc` tagged with its catalyst.target triple and
catalyst.dispatch address; the host launches `coproc_serve`
(nonblocking) / `coproc_stop`.
- Remote controller: the controller's ops go into its role-tagged target
module as `setup_transport/teardown_transport` and the host
`@setup/@teardown` become the single orchestration point that launches
every dispatched role in dependency order (serve → controller setup;
coproc stop → controller teardown), and `@setup` is marked
catalyst.backline_bringup so the object-shipping pass knows where to
ship from.
**Benefits:**
**Possible Drawbacks:**
**Related GitHub Issues:**
---------
Co-authored-by: Joseph Lee <joseph.lee@xanadu.ai>
Co-authored-by: Joseph Lee <40768758+josephleekl@users.noreply.github.com>
Co-authored-by: Hong-Sheng Zheng <mathan0203@gmail.com>
Co-authored-by: Shuli Shu <31480676+multiphaseCFD@users.noreply.github.com>
0 commit comments