Skip to content

Commit ce05831

Browse files
committed
Merge down from main
2 parents fb198e1 + bd4d5d0 commit ce05831

File tree

14 files changed

+117
-54
lines changed

14 files changed

+117
-54
lines changed

.cudaq_version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"cudaq": {
33
"repository": "NVIDIA/cuda-quantum",
4-
"ref": "27455ca2d2f868e537ad28265ce6e65207e2f2fe"
4+
"ref": "4f284af95b252e69ab08ba4f1ef7fa1ea69dd66a"
55
}
66
}

.github/workflows/all_libs.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,10 @@ jobs:
106106
LD_LIBRARY_PATH: ${{ env.MPI_PATH }}/lib:${{ env.LD_LIBRARY_PATH }}
107107
shell: bash
108108
run: |
109-
pip install numpy pytest cupy-cuda${{ steps.config.outputs.cuda_major }}x cuquantum-cu${{ steps.config.outputs.cuda_major }} torch lightning ml_collections mpi4py transformers quimb opt_einsum torch nvidia-cublas cuquantum-python-cu${{ steps.config.outputs.cuda_major }}==25.09
109+
# Install the correct torch first.
110+
cuda_no_dot=$(echo ${{ matrix.cuda_version }} | sed 's/\.//')
111+
pip install torch==2.9.0 --index-url https://download.pytorch.org/whl/cu${cuda_no_dot}
112+
pip install numpy pytest cupy-cuda${{ steps.config.outputs.cuda_major }}x cuquantum-cu${{ steps.config.outputs.cuda_major }} lightning ml_collections mpi4py transformers quimb opt_einsum nvidia-cublas cuquantum-python-cu${{ steps.config.outputs.cuda_major }}==25.09.1
110113
# The following tests are needed for docs/sphinx/examples/qec/python/tensor_network_decoder.py.
111114
if [ "$(uname -m)" == "x86_64" ]; then
112115
# Stim is not currently available on manylinux ARM wheels, so only

.github/workflows/all_libs_release.yaml

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ on:
1010
assets_repo:
1111
type: string
1212
description: Retrieve assets from a draft release from this repo (e.g. NVIDIA/cudaqx)
13+
default: 'NVIDIA/cudaqx'
1314
required: false
1415
assets_tag:
1516
type: string
16-
description: Retrieve assets from a draft release with this tag (e.g. installed_files-1)
17+
description: Retrieve assets from a draft release with this tag (e.g. docker-files-123)
1718
required: false
1819

1920
jobs:
@@ -26,19 +27,29 @@ jobs:
2627
{ arch: arm64, gpu: a100 },
2728
{ arch: amd64, gpu: a100 },
2829
]
29-
cuda_version: ['12.6']
30+
cuda_version: ['12.6', '13.0']
3031
runs-on: linux-${{ matrix.runner.arch }}-gpu-${{ matrix.runner.gpu }}-latest-1
3132
container:
32-
image: ${{ format('ghcr.io/nvidia/cudaqx-dev:{0}-{1}', inputs.release-number, matrix.runner.arch) }}
33+
image: >-
34+
${{
35+
inputs.release-number == '0.0.0'
36+
&& format('ghcr.io/nvidia/cudaqx-dev:{0}-{1}-cu{2}', 'latest', matrix.runner.arch, matrix.cuda_version)
37+
|| format('ghcr.io/nvidia/cudaqx-dev:{0}-{1}-cu{2}', inputs.release-number, matrix.runner.arch, matrix.cuda_version)
38+
}}
3339
env:
3440
NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }}
3541
permissions: write-all
3642
steps:
43+
- name: Install dependencies
44+
run: |
45+
apt update && apt install -y --no-install-recommends zip unzip patchelf git-lfs
46+
3747
- name: Checkout repository
3848
uses: actions/checkout@v4
3949
with:
40-
ref: releases/v${{ inputs.release-number }}
50+
ref: ${{ inputs.release-number == '0.0.0' && 'main' || format('releases/v{0}', inputs.release-number) }}
4151
set-safe-directory: true
52+
lfs: true # download assets file(s) for TRT tests
4253

4354
- name: Set git safe directory
4455
run: git config --global --add safe.directory $GITHUB_WORKSPACE
@@ -52,10 +63,6 @@ jobs:
5263
echo "Setting CUDAQX_QEC_VERSION=${{ inputs.release-number }}" >> $GITHUB_STEP_SUMMARY
5364
echo "Setting CUDAQX_SOLVERS_VERSION=${{ inputs.release-number }}" >> $GITHUB_STEP_SUMMARY
5465
55-
- name: Install dependencies
56-
run: |
57-
apt update && apt install -y --no-install-recommends zip unzip patchelf
58-
5966
- name: Fetch assets and set QEC_EXTERNAL_DECODERS
6067
env:
6168
GH_TOKEN: ${{ github.token }}
@@ -71,8 +78,8 @@ jobs:
7178
gh release view -R ${{ inputs.assets_repo }} ${{ inputs.assets_tag }} >> $GITHUB_STEP_SUMMARY
7279
# Extract the decoder that needs to be embedded in the release
7380
mkdir -p tmp
74-
unzip -d tmp installed_files-${{ matrix.runner.arch }}.zip
75-
echo "QEC_EXTERNAL_DECODERS=$(pwd)/tmp/lib/decoder-plugins/libcudaq-qec-nv-qldpc-decoder.so" >> $GITHUB_ENV
81+
tar -C tmp -xzvf nv-qldpc-decoder-${{ matrix.runner.arch }}_ubuntu24.04_cuda${{ matrix.cuda_version }}_release.tar.gz
82+
echo "QEC_EXTERNAL_DECODERS=$(pwd)/tmp/libcudaq-qec-nv-qldpc-decoder.so" >> $GITHUB_ENV
7683
fi
7784
shell: bash
7885

@@ -97,15 +104,15 @@ jobs:
97104

98105
- name: Save build artifacts
99106
run: |
100-
cmake --build ${{ steps.build.outputs.build-dir }} --target zip_installed_files
107+
cmake --build ${{ steps.build.outputs.build-dir }} --target zip_installed_files --parallel
101108
cd ${{ steps.build.outputs.build-dir }}
102-
mv installed_files.zip installed_files-${{ matrix.runner.arch }}-cu${{ matrix.cuda_version}}.zip
109+
mv installed_files.zip installed_files-${{ matrix.runner.arch }}-cu${{ matrix.cuda_version }}.zip
103110
104111
- name: Upload build artifacts
105112
uses: actions/upload-artifact@v4
106113
with:
107-
name: installed_files-${{ matrix.runner.arch }}-cu${{ matrix.cuda_version}}
108-
path: ${{ steps.build.outputs.build-dir }}/installed_files-${{ matrix.runner.arch }}-cu${{ matrix.cuda_version}}.zip
114+
name: installed_files-${{ matrix.runner.arch }}-cu${{ matrix.cuda_version }}
115+
path: ${{ steps.build.outputs.build-dir }}/installed_files-${{ matrix.runner.arch }}-cu${{ matrix.cuda_version }}.zip
109116

110117
# ========================================================================
111118
# Run tests
@@ -121,7 +128,18 @@ jobs:
121128
- name: Install python requirements
122129
env:
123130
LD_LIBRARY_PATH: ${{ env.MPI_PATH }}/lib:${{ env.LD_LIBRARY_PATH }}
124-
run: pip install numpy pytest cupy-cuda${{ steps.config.outputs.cuda_major }}x cuquantum-cu${{ steps.config.outputs.cuda_major }} torch lightning ml_collections mpi4py transformers quimb opt_einsum torch
131+
shell: bash
132+
run: |
133+
# Install the correct torch first.
134+
cuda_no_dot=$(echo ${{ matrix.cuda_version }} | sed 's/\.//')
135+
pip install torch==2.9.0 --index-url https://download.pytorch.org/whl/cu${cuda_no_dot}
136+
pip install numpy pytest cupy-cuda${{ steps.config.outputs.cuda_major }}x cuquantum-cu${{ steps.config.outputs.cuda_major }} lightning ml_collections mpi4py transformers quimb opt_einsum nvidia-cublas cuquantum-python-cu${{ steps.config.outputs.cuda_major }}==25.09.1
137+
# The following tests are needed for docs/sphinx/examples/qec/python/tensor_network_decoder.py.
138+
if [ "$(uname -m)" == "x86_64" ]; then
139+
# Stim is not currently available on manylinux ARM wheels, so only
140+
# install for x86_64.
141+
pip install stim beliefmatching
142+
fi
125143
126144
- name: Run Python tests
127145
env:

.github/workflows/build_wheels.yaml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ on:
2626
assets_repo:
2727
type: string
2828
description: Retrieve assets from a draft release from this repo (e.g. NVIDIA/cudaqx)
29+
default: 'NVIDIA/cudaqx'
2930
required: false
3031
assets_tag:
3132
type: string
32-
description: Retrieve assets from a draft release with this tag (e.g. installed_files-1)
33+
description: Retrieve assets from a draft release with this tag (e.g. wheels-123)
3334
required: false
3435
artifacts_from_run:
3536
type: string
@@ -147,16 +148,13 @@ jobs:
147148
.github/workflows/scripts/build_cudaq.sh --python-version ${{ matrix.python }}
148149
149150
- name: Build CUDA-QX wheels
150-
env:
151-
SUFFIX: ${{ matrix.platform == 'amd64' && 'x86_64' || 'aarch64' }}
152151
shell: bash
153152
run: |
154153
if [[ -n "${{ inputs.assets_repo }}" ]] && [[ -n "${{ inputs.assets_tag }}" ]]; then
155154
# Extract the decoder that needs to be embedded in the wheel
156155
mkdir -p tmp
157-
PYVER=$(echo ${{ matrix.python }} | tr -d '.')
158-
unzip -d tmp cudaq_qec-*-cp${PYVER}-cp${PYVER}-manylinux*${SUFFIX}*.whl
159-
export QEC_EXTERNAL_DECODERS=$(pwd)/tmp/cudaq_qec/lib/decoder-plugins/libcudaq-qec-nv-qldpc-decoder.so
156+
tar -C tmp -xzvf nv-qldpc-decoder-${{ matrix.platform }}_ubuntu24.04_cuda${{ matrix.cuda_version }}_py${{ matrix.python }}_release.tar.gz
157+
export QEC_EXTERNAL_DECODERS=$(pwd)/tmp/libcudaq-qec-nv-qldpc-decoder.so
160158
fi
161159
# This is needed to allow the "git rev-parse" commands in the build
162160
# scripts to work.
@@ -193,6 +191,7 @@ jobs:
193191
shell: bash
194192
run: |
195193
apt update && apt install -y --no-install-recommends python3 python3-pip python3-venv
194+
apt install -y --no-install-recommends ca-certificates
196195
python3 -m pip install --break-system-packages build
197196
198197
- name: Build CUDA-QX Meta Packages
@@ -305,6 +304,7 @@ jobs:
305304
run: |
306305
apt update
307306
apt install -y --no-install-recommends libgfortran5 unzip openmpi-bin libopenmpi3
307+
apt install -y --no-install-recommends ca-certificates
308308
# If this is x86_64, then install libquadmath0. This is normally
309309
# installed by Ubuntu Python, but the action/setup-python package does
310310
# not install it.
@@ -346,7 +346,7 @@ jobs:
346346
bash scripts/ci/test_wheels.sh \
347347
${{ matrix.python }} \
348348
${{ matrix.platform }} \
349-
${{ steps.config.outputs.cuda_major }} \
349+
${{ matrix.cuda_version }} \
350350
${{ inputs.cudaq_wheels == 'Custom' && '0.99.99' || 'SKIP' }} \
351351
${{ inputs.version || '0.99.99' }}
352352
@@ -411,6 +411,7 @@ jobs:
411411
run: |
412412
apt update
413413
apt install -y --no-install-recommends libgfortran5 unzip openmpi-bin libopenmpi3
414+
apt install -y --no-install-recommends ca-certificates
414415
# If this is x86_64, then install libquadmath0. This is normally
415416
# installed by Ubuntu Python, but the action/setup-python package does
416417
# not install it.
@@ -455,7 +456,7 @@ jobs:
455456
bash scripts/ci/test_wheels.sh \
456457
${{ matrix.python }} \
457458
${{ matrix.runner.arch }} \
458-
${{ steps.config.outputs.cuda_major }} \
459+
${{ matrix.cuda_version }} \
459460
${{ inputs.cudaq_wheels == 'Custom' && '0.99.99' || 'SKIP' }} \
460461
${{ inputs.version || '0.99.99' }}
461462

.github/workflows/lib_qec.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,10 @@ jobs:
103103
- name: Install python requirements
104104
shell: bash
105105
run: |
106-
pip install numpy pytest cupy-cuda${{ steps.config.outputs.cuda_major }}x cuquantum-cu${{ steps.config.outputs.cuda_major }} quimb opt_einsum torch nvidia-cublas cuquantum-python-cu${{ steps.config.outputs.cuda_major }}==25.09
106+
# Install the correct torch first.
107+
cuda_no_dot=$(echo ${{ matrix.cuda_version }} | sed 's/\.//')
108+
pip install torch==2.9.0 --index-url https://download.pytorch.org/whl/cu${cuda_no_dot}
109+
pip install numpy pytest cupy-cuda${{ steps.config.outputs.cuda_major }}x cuquantum-cu${{ steps.config.outputs.cuda_major }} quimb opt_einsum nvidia-cublas cuquantum-python-cu${{ steps.config.outputs.cuda_major }}==25.09.1
107110
# The following tests are needed for docs/sphinx/examples/qec/python/tensor_network_decoder.py.
108111
if [ "$(uname -m)" == "x86_64" ]; then
109112
# Stim is not currently available on manylinux ARM wheels, so only

.github/workflows/lib_solvers.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ jobs:
9090
- name: Install python requirements
9191
env:
9292
LD_LIBRARY_PATH: ${{ env.MPI_PATH }}/lib:${{ env.LD_LIBRARY_PATH }}
93-
run: pip install numpy pytest cupy-cuda${{ steps.config.outputs.cuda_major }}x cuquantum-cu${{ steps.config.outputs.cuda_major }} torch lightning ml_collections mpi4py transformers pytest
93+
run: |
94+
# Install the correct torch first.
95+
cuda_no_dot=$(echo ${{ matrix.cuda_version }} | sed 's/\.//')
96+
pip install torch==2.9.0 --index-url https://download.pytorch.org/whl/cu${cuda_no_dot}
97+
pip install numpy pytest cupy-cuda${{ steps.config.outputs.cuda_major }}x cuquantum-cu${{ steps.config.outputs.cuda_major }} lightning ml_collections mpi4py transformers pytest
9498
9599
96100
- name: Run Python tests

libs/qec/lib/decoder.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,10 @@ decoder::get(const std::string &name, const cudaqx::tensor<uint8_t> &H,
134134
auto &registry = get_registry();
135135
auto iter = registry.find(name);
136136
if (iter == registry.end())
137-
throw std::runtime_error("invalid decoder requested: " + name);
137+
throw std::runtime_error(
138+
"invalid decoder requested: " + name +
139+
". Run with CUDAQ_LOG_LEVEL=info (environment variable) to see "
140+
"additional plugin diagnostics at startup.");
138141
return iter->second(H, param_map);
139142
}
140143

libs/qec/lib/plugin_loader.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
******************************************************************************/
88

99
#include "cudaq/qec/plugin_loader.h"
10+
#include "common/Logger.h"
1011
#include <filesystem>
1112
#include <iostream>
1213

@@ -43,9 +44,14 @@ void load_plugins(const std::string &plugin_dir, PluginType type) {
4344
PluginHandle{std::unique_ptr<void, PluginDeleter>(raw_handle,
4445
PluginDeleter()),
4546
type});
47+
CUDAQ_INFO("Successfully loaded plugin: {}", entry.path().string());
4648
} else {
47-
std::cerr << "ERROR: Failed to load plugin: " << entry.path()
48-
<< " Error: " << dlerror() << std::endl;
49+
// The TRT decoder is an optional decoder that is not always available.
50+
// Do not clutter up the console with error messages if it is not
51+
// available. We only output an error message if info logging is
52+
// enabled.
53+
CUDAQ_INFO("Failed to load plugin {} Error: {}. Continuing anyway.",
54+
entry.path().string(), dlerror());
4955
}
5056
}
5157
}

libs/qec/pyproject.toml.cu12

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ maintainers = [{name = "NVIDIA Corporation & Affiliates"}]
1111
requires-python = ">=3.11"
1212
readme = "README.md"
1313
dependencies = [
14-
'cuda-quantum-cu12 >= 0.12',
14+
'cuda-quantum-cu12 >= 0.13',
1515
]
1616
classifiers = [
1717
'Intended Audience :: Science/Research',
@@ -56,7 +56,7 @@ tensor_network_decoder = [
5656
"quimb",
5757
"opt_einsum",
5858
"torch",
59-
"cuquantum-python-cu12==25.09"
59+
"cuquantum-python-cu12==25.09.1"
6060
]
6161
trt_decoder = [
6262
"tensorrt-cu12"
@@ -65,6 +65,6 @@ all = [
6565
"quimb",
6666
"opt_einsum",
6767
"torch",
68-
"cuquantum-python-cu12==25.09",
68+
"cuquantum-python-cu12==25.09.1",
6969
"tensorrt-cu12; platform_machine == 'x86_64'"
7070
]

libs/qec/pyproject.toml.cu13

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ maintainers = [{name = "NVIDIA Corporation & Affiliates"}]
1111
requires-python = ">=3.11"
1212
readme = "README.md"
1313
dependencies = [
14-
'cuda-quantum-cu13 >= 0.12',
14+
'cuda-quantum-cu13 >= 0.13',
1515
]
1616
classifiers = [
1717
'Intended Audience :: Science/Research',
@@ -56,7 +56,7 @@ tensor_network_decoder = [
5656
"quimb",
5757
"opt_einsum",
5858
"torch>=2.9.0",
59-
"cuquantum-python-cu13==25.09"
59+
"cuquantum-python-cu13==25.09.1"
6060
]
6161
trt_decoder = [
6262
"tensorrt-cu13"
@@ -65,6 +65,6 @@ all = [
6565
"quimb",
6666
"opt_einsum",
6767
"torch>=2.9.0",
68-
"cuquantum-python-cu13==25.09",
68+
"cuquantum-python-cu13==25.09.1",
6969
"tensorrt-cu13"
7070
]

0 commit comments

Comments
 (0)