Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
5ae18e5
Define runtime transport layer interface for backline backends
josephleekl Jul 20, 2026
5e76333
update changelog
josephleekl Jul 20, 2026
279a2b4
comments
josephleekl Jul 20, 2026
a319b39
update changelog
josephleekl Jul 20, 2026
0bb4b19
Merge branch 'main' into josephleekl/transport-layer
josephleekl Jul 20, 2026
c523f67
Transport Layer Loader is added
rniczh Jul 20, 2026
2b88bd4
Merge branch 'main' into josephleekl/transport-layer
josephleekl Jul 20, 2026
8dccc62
update interface
rniczh Jul 20, 2026
fc399e9
Merge branch 'josephleekl/transport-layer' into rniczh/tranport-layer…
rniczh Jul 20, 2026
cdee60b
coprocessor backend interface is added
rniczh Jul 20, 2026
da41e92
chagne type
rniczh Jul 20, 2026
2b6c1e9
Merge branch 'josephleekl/transport-layer' into rniczh/tranport-layer…
rniczh Jul 20, 2026
6e942a9
remove redundancy
rniczh Jul 20, 2026
4408322
add start
rniczh Jul 20, 2026
5282f5a
update comment
rniczh Jul 20, 2026
2b36a11
Merge branch 'josephleekl/transport-layer' into rniczh/tranport-layer…
rniczh Jul 20, 2026
32fc6f2
update changelog
rniczh Jul 20, 2026
2fc50c3
update
rniczh Jul 20, 2026
4d211ce
update
rniczh Jul 20, 2026
060458b
remove redundancy
rniczh Jul 20, 2026
246a4b7
number of collection is always 1
rniczh Jul 20, 2026
22cd621
update interface
rniczh Jul 20, 2026
5b57ef4
Merge branch 'josephleekl/transport-layer' into rniczh/tranport-layer…
rniczh Jul 20, 2026
18c2684
Add transport dialect
mehrdad2m Jul 21, 2026
6984afa
Add transport-to-llvm pass
mehrdad2m Jul 21, 2026
7630570
Update runtime/include/Transport.hpp
rniczh Jul 21, 2026
da12f30
Apply suggestion from @mehrdad2m
rniczh Jul 21, 2026
5490f08
Apply suggestion from @mehrdad2m
rniczh Jul 21, 2026
5d639c5
Apply suggestion from @mehrdad2m
rniczh Jul 21, 2026
30ebdf0
Merge branch 'josephleekl/transport-layer' into rniczh/tranport-layer…
rniczh Jul 21, 2026
8979bfc
Merge branch 'main' into transport-dialect
mehrdad2m Jul 21, 2026
2d8991e
Merge branch 'transport-dialect' into transport-to-llvm-pass
mehrdad2m Jul 21, 2026
e04d7b2
Merge branch 'transport-to-llvm-pass' into rniczh/tranport-layer-loader
mehrdad2m Jul 21, 2026
fd17906
update
mehrdad2m Jul 22, 2026
9cd39b5
update
mehrdad2m Jul 22, 2026
c2c1c73
Merge branch 'transport-dialect' into transport-to-llvm-pass
mehrdad2m Jul 22, 2026
7b3ff71
update
mehrdad2m Jul 22, 2026
b09fcc5
Merge branch 'transport-to-llvm-pass' into rniczh/tranport-layer-loader
mehrdad2m Jul 22, 2026
bdfab4c
format
mehrdad2m Jul 22, 2026
b911d91
Merge branch 'transport-dialect' into transport-to-llvm-pass
mehrdad2m Jul 22, 2026
a515020
format
mehrdad2m Jul 22, 2026
6b84b8c
Merge branch 'transport-to-llvm-pass' into rniczh/tranport-layer-loader
mehrdad2m Jul 22, 2026
7e86066
Merge branch 'main' into transport-dialect
mehrdad2m Jul 22, 2026
e4a779b
add include to lsp
mehrdad2m Jul 23, 2026
44e0d6a
add changelog
mehrdad2m Jul 23, 2026
0340a86
initial copy
josephleekl Jul 23, 2026
e34c06a
Refine transport dialect: string data_path, get_session, typed round …
mehrdad2m Jul 24, 2026
ed2a082
add tests
mehrdad2m Jul 24, 2026
a6493b2
fix
mehrdad2m Jul 24, 2026
56259d3
Merge branch 'transport-dialect' into transport-to-llvm-pass
mehrdad2m Jul 24, 2026
1c2ea7a
update get_session
mehrdad2m Jul 24, 2026
8887466
add changelog
mehrdad2m Jul 24, 2026
f6d1426
refine the CAPI
mehrdad2m Jul 24, 2026
266d3d9
Add tests
mehrdad2m Jul 24, 2026
61d3a0b
format
mehrdad2m Jul 24, 2026
a14e1fd
add tests
mehrdad2m Jul 24, 2026
747c0ed
format
mehrdad2m Jul 24, 2026
8f801e6
Merge branch 'transport-to-llvm-pass' into rniczh/tranport-layer-loader
mehrdad2m Jul 24, 2026
fb3c784
update namespace and test
josephleekl Jul 24, 2026
3937c94
Merge remote-tracking branch 'origin/rniczh/tranport-layer-loader' in…
josephleekl Jul 24, 2026
d45f158
format
josephleekl Jul 24, 2026
ff83df8
Update runtime/lib/transport/common/QueuePair.cpp
josephleekl Jul 24, 2026
853df0b
Update runtime/tests/CMakeLists.txt
josephleekl Jul 24, 2026
1767ee1
add comment for CPU controller commit work item
josephleekl Jul 24, 2026
718eedb
Merge branch 'main' into transport-dialect
mehrdad2m Jul 25, 2026
676c117
Merge branch 'transport-dialect' into transport-to-llvm-pass
mehrdad2m Jul 25, 2026
cb83699
Merge branch 'transport-to-llvm-pass' into rniczh/tranport-layer-loader
mehrdad2m Jul 25, 2026
ff8a253
format
mehrdad2m Jul 25, 2026
844eef2
Merge branch 'transport-dialect' into transport-to-llvm-pass
mehrdad2m Jul 25, 2026
cbb2c7a
Merge branch 'transport-to-llvm-pass' into rniczh/tranport-layer-loader
mehrdad2m Jul 25, 2026
0b0d0c0
format
mehrdad2m Jul 25, 2026
05195ab
Merge branch 'transport-to-llvm-pass' into rniczh/tranport-layer-loader
mehrdad2m Jul 25, 2026
a53549c
apply ne w catalyst-dev changes
mehrdad2m Jul 25, 2026
245af10
Merge branch 'transport-to-llvm-pass' into rniczh/tranport-layer-loader
mehrdad2m Jul 25, 2026
b01d828
Add ENABLE_TRANSPORT
mehrdad2m Jul 27, 2026
7a25f72
Merge branch 'rniczh/tranport-layer-loader' into josephleekl/transpor…
josephleekl Jul 27, 2026
a3423be
Initial commit
multiphaseCFD Jul 28, 2026
8995011
update docstr
multiphaseCFD Jul 28, 2026
cd3b0a5
try to pin to ubuntu-22.04
multiphaseCFD Jul 28, 2026
03648e1
try to build roce with 24.04
multiphaseCFD Jul 28, 2026
00d6020
test fix
multiphaseCFD Jul 28, 2026
b932879
tidy up docstr
multiphaseCFD Jul 28, 2026
8e28fac
add changelog
multiphaseCFD Jul 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
189 changes: 189 additions & 0 deletions .github/workflows/check-transport.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
name: Check Transport Backends

on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
paths:
- 'runtime/lib/transport/**'
- 'runtime/tests/Test_Transport*.cpp'
- 'runtime/tests/stubs/stub_transport_backend*'
- 'runtime/tests/CMakeLists.txt'
- 'runtime/CMakeLists.txt'
- 'runtime/lib/CMakeLists.txt'
- 'runtime/Makefile'
- 'Makefile'
- '.github/workflows/check-transport.yaml'
push:
branches: [ main ]
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
determine_runner:
if: github.event.pull_request.draft == false
name: Determine runner type to use
uses: ./.github/workflows/determine-workflow-runner.yml
with:
default_runner: ubuntu-24.04

constants:
name: "Set build matrix"
uses: ./.github/workflows/constants.yaml
needs: [determine_runner]
with:
multiple_compilers: false
runs_on: ${{ needs.determine_runner.outputs.runner_group }}

transport-tests:
name: Transport Backend Tests (Soft-RoCE)
needs: [constants, determine_runner]
runs-on: ${{ needs.determine_runner.outputs.runner_group }}

steps:
- name: Checkout Catalyst repo
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ needs.constants.outputs.primary_python_version }}

- name: Install build and RDMA userland dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
cmake ninja-build clang make \
libibverbs-dev libibverbs1 ibverbs-providers ibverbs-utils \
rdma-core iproute2
python3 -m pip install "nanobind<2.13" pybind11

- name: Ensure rdma_rxe.ko is available for the running kernel
run: |
# Try linux-modules-extra first; if the .ko isn't there, build
# rdma_rxe out-of-tree from the matching upstream stable branch.
set -euo pipefail

KVER=$(uname -r)
echo "Running kernel: $KVER"

have_rxe() {
find /lib/modules/"$KVER" -name 'rdma_rxe*' -print -quit | grep -q .
}

# --- Path 1: standard Ubuntu extras package ----------------------
sudo apt-get install -y "linux-modules-extra-$KVER" 2>/dev/null || true
sudo depmod -a
if have_rxe; then
echo "rdma_rxe.ko provided by linux-modules-extra-$KVER"
find /lib/modules/"$KVER" -name 'rdma_rxe*' -print
exit 0
fi

echo "linux-modules-extra unavailable or missing rdma_rxe;" \
"falling back to out-of-tree build."

# --- Path 2: build rdma_rxe out-of-tree --------------------------
sudo apt-get install -y \
build-essential bc bison flex libssl-dev libelf-dev git \
"linux-headers-$KVER"

# Upstream stable branch matching the running kernel's major.minor.
KVER_MAJMIN=$(echo "$KVER" | cut -d- -f1 | cut -d. -f1-2)
SRC=/tmp/linux-src
echo "Cloning linux-${KVER_MAJMIN}.y stable branch..."
git clone --depth 1 \
--branch "linux-${KVER_MAJMIN}.y" \
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git \
"$SRC"

# Force obj-m; Azure kernel has CONFIG_RDMA_RXE unset.
sed -i 's|obj-\$(CONFIG_RDMA_RXE)|obj-m|' \
"$SRC/drivers/infiniband/sw/rxe/Makefile"

make -C "/lib/modules/$KVER/build" \
M="$SRC/drivers/infiniband/sw/rxe" modules

KO="$SRC/drivers/infiniband/sw/rxe/rdma_rxe.ko"
if [ ! -f "$KO" ]; then
echo "::error::rdma_rxe.ko not produced by build"
ls -la "$SRC/drivers/infiniband/sw/rxe/"
exit 1
fi

sudo install -D -m 644 "$KO" \
"/lib/modules/$KVER/kernel/drivers/infiniband/sw/rxe/rdma_rxe.ko"
sudo depmod -a

if ! have_rxe; then
echo "::error::rdma_rxe.ko not resolvable after install"
exit 1
fi
echo "Built and installed rdma_rxe.ko from linux-${KVER_MAJMIN}.y"
modinfo rdma_rxe | head -20

- name: Configure Soft-RoCE (rxe0 on loopback)
run: |
# Attach rdma_rxe to `lo` so the tests find an ibverbs device named rxe0.
sudo modprobe rdma_rxe
sudo rdma link add rxe0 type rxe netdev lo
rdma link show
ibv_devices
ibv_devinfo -d rxe0
# Fail fast if rxe0 didn't come up - otherwise Catch2 tests would
# silently SKIP and the loopback would be the only thing exercising it.
ibv_devices | awk '{print $1}' | grep -q '^rxe0$'

- name: Get Cached LLVM Source
id: cache-llvm-source
uses: actions/cache/restore@v4
with:
path: mlir/llvm-project
key: llvm-${{ needs.constants.outputs.llvm_version }}-default-source
enableCrossOsArchive: true

- name: Clone LLVM Submodule
if: steps.cache-llvm-source.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: llvm/llvm-project
ref: ${{ needs.constants.outputs.llvm_version }}
path: mlir/llvm-project

- name: Build Catalyst-Runtime with ENABLE_TRANSPORT=ON
run: |
COMPILER_LAUNCHER="" \
C_COMPILER=$(which clang) \
CXX_COMPILER=$(which clang++) \
LLVM_DIR="$(pwd)/mlir/llvm-project" \
ENABLE_ASAN=OFF \
ENABLE_TRANSPORT=ON \
make runtime

- name: Run transport test suite (Catch2 + loopback)
run: |
COMPILER_LAUNCHER="" \
C_COMPILER=$(which clang) \
CXX_COMPILER=$(which clang++) \
LLVM_DIR="$(pwd)/mlir/llvm-project" \
make test-runtime-transport

- name: Upload loopback logs on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: transport-loopback-logs
path: |
/tmp/cvl_coproc.log
/tmp/cvl_ctrl.log
if-no-files-found: ignore
retention-days: 7
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ENZYME_BUILD_DIR ?= $(MK_DIR)/mlir/Enzyme/build
COVERAGE_REPORT ?= term-missing
ENABLE_OPENQASM ?= ON
ENABLE_OQD ?= OFF
ENABLE_TRANSPORT ?= OFF
TEST_BACKEND ?= "lightning.qubit"
TEST_BRAKET ?= NONE
ENABLE_ASAN ?= OFF
Expand Down Expand Up @@ -150,12 +151,12 @@ dialect-docs:
$(MAKE) -C mlir dialect-docs

runtime:
$(MAKE) -C runtime runtime ENABLE_OQD=$(ENABLE_OQD)
$(MAKE) -C runtime runtime ENABLE_OQD=$(ENABLE_OQD) ENABLE_TRANSPORT=$(ENABLE_TRANSPORT)

oqc:
$(MAKE) -C frontend/catalyst/third_party/oqc/src oqc

.PHONY: test test-runtime test-frontend lit pytest test-demos test-oqc test-toml-spec
.PHONY: test test-runtime test-runtime-transport test-frontend lit pytest test-demos test-oqc test-toml-spec
test: test-runtime test-frontend test-demos

test-toml-spec:
Expand All @@ -164,6 +165,9 @@ test-toml-spec:
test-runtime:
$(MAKE) -C runtime test

test-runtime-transport:
$(MAKE) -C runtime test-transport

test-mlir:
$(MAKE) -C mlir test

Expand Down
12 changes: 12 additions & 0 deletions doc/releases/changelog-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@

* A new runtime transport layer for remote/local executors is introduced.
[(#3043)](https://github.com/PennyLaneAI/catalyst/pull/3043)
[(#3045)](https://github.com/PennyLaneAI/catalyst/pull/3045)

* A new `Transport` MLIR dialect is added, providing typed ops for driving a transport session's
lifecycle at the IR level.
[(#3047)](https://github.com/PennyLaneAI/catalyst/pull/3047)

* A `convert-transport-to-llvm` pass is added, lowering the `Transport` dialect ops to the
transport runtime CAPI.
[(#3048)](https://github.com/PennyLaneAI/catalyst/pull/3048)

* A new remote/local executor infrastructure has been added to Catalyst, enabling qnode kernels to
be dispatched to a separate executor process. `executor` dialect models the session lifecycle
Expand Down Expand Up @@ -306,6 +315,9 @@
* The `/benchmark` GitHub comment trigger can now accept additional arguments and has been renamed to `!benchmark`.
[(#2947)](https://github.com/PennyLaneAI/catalyst/pull/2947)

* Added CI checks for the runtime `cpu_verbs` transport backend via Soft-RoCE.
[(#3074)](https://github.com/PennyLaneAI/catalyst/pull/3074)

* The frontend now generates MLIR in reference semantics when capture is enabled.
[(#2663)](https://github.com/PennyLaneAI/catalyst/pull/2663)
[(#2664)](https://github.com/PennyLaneAI/catalyst/pull/2664)
Expand Down
1 change: 1 addition & 0 deletions mlir/include/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ add_subdirectory(Quantum)
add_subdirectory(QRef)
add_subdirectory(Executor)
add_subdirectory(RTIO)
add_subdirectory(Transport)
add_subdirectory(Test)
2 changes: 2 additions & 0 deletions mlir/include/RegisterAllPasses.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "hlo-extensions/Transforms/Passes.h"

#include "Executor/Transforms/Passes.h"
#include "Transport/Transforms/Passes.h"

namespace catalyst {

Expand All @@ -47,6 +48,7 @@ inline void registerAllPasses()
quantum::registerQuantumPasses();
executor::registerExecutorPasses();
rtio::registerRTIOPasses();
transport::registerTransportPasses();
test::registerTestPasses();
}

Expand Down
2 changes: 2 additions & 0 deletions mlir/include/Transport/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
add_subdirectory(IR)
add_subdirectory(Transforms)
8 changes: 8 additions & 0 deletions mlir/include/Transport/IR/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
add_mlir_dialect(TransportOps transport)
add_mlir_doc(TransportDialect TransportDialect Transport/ -gen-dialect-doc)
add_mlir_doc(TransportOps TransportOps Transport/ -gen-op-doc)

set(LLVM_TARGET_DEFINITIONS TransportOps.td)
mlir_tablegen(TransportEnums.h.inc -gen-enum-decls)
mlir_tablegen(TransportEnums.cpp.inc -gen-enum-defs)
add_public_tablegen_target(MLIRTransportEnumsIncGen)
25 changes: 25 additions & 0 deletions mlir/include/Transport/IR/TransportDialect.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Copyright 2026 Xanadu Quantum Technologies Inc.

// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at

// http://www.apache.org/licenses/LICENSE-2.0

// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#pragma once

#include "mlir/Bytecode/BytecodeOpInterface.h"
#include "mlir/IR/Dialect.h"
#include "mlir/IR/OpDefinition.h"

#include "Transport/IR/TransportEnums.h.inc"
#include "Transport/IR/TransportOpsDialect.h.inc"

#define GET_TYPEDEF_CLASSES
#include "Transport/IR/TransportOpsTypes.h.inc"
Loading
Loading