Skip to content

Commit 5d1f2af

Browse files
authored
Merge branch 'main' into update_trt_decoder_yaml
Signed-off-by: Scott Thornton <wsttiger@gmail.com>
2 parents d60c4e2 + d199363 commit 5d1f2af

47 files changed

Lines changed: 2759 additions & 171 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cudaq_realtime_version

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

.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": "cd88025b3d1beb02ca2703de70a583e647af10fb"
4+
"ref": "67404cea365c0f78a9319f89ef634afca15011c8"
55
}
66
}

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<!--
2+
Thanks for contributing to CUDA-Q Libraries!
3+
4+
Please read the full Pull Request Guidelines in Contributing.md:
5+
https://github.com/NVIDIA/cudaqx/blob/main/Contributing.md#pull-request-guidelines
6+
-->
7+
8+
## Description
9+
10+
<!-- What does this PR change, and why? Link related issues. -->
11+
12+
## Runtime / performance impact
13+
14+
<!--
15+
If this change affects performance, paste benchmark numbers here.
16+
Otherwise write "N/A".
17+
-->
18+
19+
## Self-review checklist
20+
21+
Please confirm each item before requesting review. Check `[x]` or strike
22+
through and explain.
23+
24+
### Before requesting review
25+
- [ ] I reviewed my own full diff in GitHub or my editor.
26+
- [ ] PR is in Draft if it is not yet ready for review.
27+
- [ ] Temporary / debugging changes have been removed.
28+
- [ ] Local test logs reviewed; no unexplained warnings or errors.
29+
- [ ] CI logs reviewed; no unexplained warnings or errors.
30+
- [ ] Full CI has been run.
31+
32+
### Scope and size
33+
- [ ] PR is under ~1000 lines, or an exception is justified in the description.
34+
- [ ] Refactoring-only changes are isolated in their own PR(s).
35+
- [ ] No existing tests were disabled or modified just to make this PR pass
36+
(if so, an issue has been raised).
37+
38+
### Tests
39+
- [ ] New functionality has new tests.
40+
- [ ] Tests fail if the new functionality is broken (including crashes), not
41+
just when it is missing.
42+
- [ ] Negative tests added where exceptions are expected.
43+
- [ ] Truth data added where simple `EXPECT_*` / `assert` checks are
44+
insufficient for algorithmic correctness.
45+
- [ ] CI runtime impact considered; team notified if significant.
46+
47+
### Documentation
48+
- [ ] Public-facing APIs have Doxygen docs.
49+
- [ ] User-visible behavior changes have public docs, or a follow-up is
50+
tracked.
51+
- [ ] User-facing docs for new features are in a **separate PR** held until
52+
release (the docs site publishes immediately on merge to the default
53+
branch, so feature docs must not land before the feature ships).
54+
55+
### Code style
56+
- [ ] Naming follows the existing convention (`snake_case` vs `camelCase`) for
57+
the area being modified.
58+
59+
### Dependencies
60+
- [ ] No new third-party dependencies, **or** the team has been notified and
61+
OSRB tickets filed.

.github/actions/build-lib/action.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: Build a CUDAQX library
2+
description: Configure, build, and optionally cache a CUDA-QX library
23

34
inputs:
45
lib:
@@ -21,7 +22,11 @@ inputs:
2122
required: true
2223
install-prefix:
2324
description: 'Install prefix'
24-
default: '~/.cudaqx'
25+
default: '$HOME/.cudaqx'
26+
required: false
27+
cudaq-prefix:
28+
description: 'CUDA-Q install prefix'
29+
default: '/cudaq-install'
2530
required: false
2631
outputs:
2732
build-dir:
@@ -67,7 +72,7 @@ runs:
6772
CCACHE_DIR: /ccache-${{ inputs.lib }}
6873
run: |
6974
build_dir=build_${{ inputs.lib }}
70-
.github/actions/build-lib/build_${{ inputs.lib }}.sh $build_dir ${{ inputs.install-prefix }}
75+
.github/actions/build-lib/build_${{ inputs.lib }}.sh "$build_dir" "${{ inputs.install-prefix }}" "${{ inputs.cudaq-prefix }}"
7176
echo "build_dir=$build_dir" >> $GITHUB_OUTPUT
7277
shell: bash
7378

@@ -90,4 +95,3 @@ runs:
9095
with:
9196
path: /ccache-${{ inputs.lib }}
9297
key: ${{ steps.ccache-key.outputs.main }}${{ steps.ccache-key.outputs.pr }}
93-

.github/actions/build-lib/build_all.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,26 @@
22

33
. "$(dirname "$0")/setup_custabilizer.sh"
44

5+
build_dir=$1
6+
install_prefix=$2
7+
cudaq_prefix=$3
8+
59
_rt_flag=""
610
if [ -n "$CUDAQ_REALTIME_ROOT" ]; then
711
_rt_flag="-DCUDAQ_REALTIME_ROOT=$CUDAQ_REALTIME_ROOT"
812
fi
913

10-
cmake -S . -B "$1" \
14+
cmake -S . -B "$build_dir" \
1115
-DCMAKE_BUILD_TYPE=Release \
1216
-DCMAKE_C_COMPILER=gcc-12 \
1317
-DCMAKE_CXX_COMPILER=g++-12 \
1418
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
1519
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
16-
-DCUDAQ_DIR=/cudaq-install/lib/cmake/cudaq/ \
20+
-DCUDAQ_DIR="$cudaq_prefix/lib/cmake/cudaq/" \
1721
-DCUDAQX_ENABLE_LIBS="all" \
1822
-DCUDAQX_INCLUDE_TESTS=ON \
1923
-DCUDAQX_BINDINGS_PYTHON=ON \
20-
-DCMAKE_INSTALL_PREFIX="$2" \
24+
-DCMAKE_INSTALL_PREFIX="$install_prefix" \
2125
$_rt_flag
2226

23-
cmake --build "$1" --target install -j 4
27+
cmake --build "$build_dir" --target install -j 4

.github/actions/build-lib/build_qec.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ set -e
33

44
. "$(dirname "$0")/setup_custabilizer.sh"
55

6+
build_dir=$1
7+
install_prefix=$2
8+
cudaq_prefix=$3
9+
610
# Build cuda-quantum realtime library + hololink tools (if CUDAQ_REALTIME_ROOT not set)
711
if [ -z "$CUDAQ_REALTIME_ROOT" ]; then
812
CUDAQ_REALTIME_ROOT=/tmp/cudaq-realtime
@@ -113,19 +117,19 @@ fi
113117
HSB_ROOT=/tmp/holoscan-sensor-bridge
114118
HSB_BUILD=${HSB_ROOT}/build
115119

116-
cmake -S libs/qec -B "$1" \
120+
cmake -S libs/qec -B "$build_dir" \
117121
-DCMAKE_BUILD_TYPE=Release \
118122
-DCMAKE_C_COMPILER=gcc-12 \
119123
-DCMAKE_CXX_COMPILER=g++-12 \
120124
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
121125
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
122-
-DCUDAQ_DIR=/cudaq-install/lib/cmake/cudaq/ \
126+
-DCUDAQ_DIR="$cudaq_prefix/lib/cmake/cudaq/" \
123127
-DCUDAQX_INCLUDE_TESTS=ON \
124128
-DCUDAQX_BINDINGS_PYTHON=ON \
125-
-DCMAKE_INSTALL_PREFIX="$2" \
129+
-DCMAKE_INSTALL_PREFIX="$install_prefix" \
126130
-DCUDAQ_REALTIME_ROOT=$CUDAQ_REALTIME_ROOT \
127131
-DCUDAQX_QEC_ENABLE_HOLOLINK_TOOLS=ON \
128132
-DHOLOSCAN_SENSOR_BRIDGE_SOURCE_DIR=$HSB_ROOT \
129133
-DHOLOSCAN_SENSOR_BRIDGE_BUILD_DIR=$HSB_BUILD
130134

131-
cmake --build "$1" --target install -j 4
135+
cmake --build "$build_dir" --target install -j 4
Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
#!/bin/sh
22

3-
cmake -S libs/solvers -B "$1" \
3+
build_dir=$1
4+
install_prefix=$2
5+
cudaq_prefix=$3
6+
7+
cmake -S libs/solvers -B "$build_dir" \
48
-DCMAKE_BUILD_TYPE=Release \
59
-DCMAKE_C_COMPILER=gcc-12 \
610
-DCMAKE_CXX_COMPILER=g++-12 \
711
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
812
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
9-
-DCUDAQ_DIR=/cudaq-install/lib/cmake/cudaq/ \
13+
-DCUDAQ_DIR="$cudaq_prefix/lib/cmake/cudaq/" \
1014
-DCUDAQX_INCLUDE_TESTS=ON \
1115
-DCUDAQX_BINDINGS_PYTHON=ON \
12-
-DCMAKE_INSTALL_PREFIX="$2"
16+
-DCMAKE_INSTALL_PREFIX="$install_prefix"
1317

14-
cmake --build "$1" --target install -j 4
18+
cmake --build "$build_dir" --target install -j 4

.github/workflows/all_libs.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
container: ghcr.io/nvidia/cuda-quantum-devcontainer:${{ matrix.platform }}-cu${{ matrix.cuda_version }}-gcc12-main
1717
permissions:
1818
actions: write
19+
contents: read
1920
pull-requests: read
2021
steps:
2122
- name: Checkout repository
@@ -113,7 +114,7 @@ jobs:
113114
# Install the correct torch first.
114115
cuda_no_dot=$(echo ${{ matrix.cuda_version }} | sed 's/\.//')
115116
pip install torch==2.9.0 --index-url https://download.pytorch.org/whl/cu${cuda_no_dot}
116-
pip install numpy pytest onnxscript 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 }}>=26.3.0"
117+
pip install numpy pytest onnxscript cuquantum-cu${{ steps.config.outputs.cuda_major }} lightning ml_collections mpi4py transformers quimb opt_einsum cotengra nvidia-cublas "cuquantum-python-cu${{ steps.config.outputs.cuda_major }}>=26.3.0"
117118
# The following tests are needed for docs/sphinx/examples/qec/python/tensor_network_decoder.py.
118119
if [ "$(uname -m)" == "x86_64" ]; then
119120
# Stim is not currently available on manylinux ARM wheels, so only

.github/workflows/all_libs_release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ jobs:
129129
cuda_version: ${{ matrix.cuda_version }}
130130
platform: ${{ matrix.runner.arch }}
131131
install-prefix: /usr/local/cudaq
132+
cudaq-prefix: /usr/local/cudaq
132133

133134
- name: Save build artifacts
134135
run: |
@@ -161,7 +162,7 @@ jobs:
161162
# Install the correct torch first.
162163
cuda_no_dot=$(echo ${{ matrix.cuda_version }} | sed 's/\.//')
163164
pip install torch==2.9.0 --index-url https://download.pytorch.org/whl/cu${cuda_no_dot}
164-
pip install numpy pytest onnxscript 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 }}>=26.3.0"
165+
pip install numpy pytest onnxscript cuquantum-cu${{ steps.config.outputs.cuda_major }} lightning ml_collections mpi4py transformers quimb opt_einsum cotengra nvidia-cublas "cuquantum-python-cu${{ steps.config.outputs.cuda_major }}>=26.3.0"
165166
# The following tests are needed for docs/sphinx/examples/qec/python/tensor_network_decoder.py.
166167
if [ "$(uname -m)" == "x86_64" ]; then
167168
# Stim is not currently available on manylinux ARM wheels, so only
@@ -193,4 +194,3 @@ jobs:
193194
run: |
194195
ln -s /usr/local/cudaq /cudaq-install
195196
bash scripts/ci/test_examples.sh all
196-

.github/workflows/build_wheels.yaml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,31 @@ on:
3636
type: string
3737
description: Optional argument to take artifacts from a prior run of this workflow; facilitates rerunning a failed workflow without re-building the artifacts.
3838
required: false
39+
workflow_call:
40+
inputs:
41+
build_type:
42+
type: string
43+
default: 'Release'
44+
required: false
45+
version:
46+
type: string
47+
required: false
48+
cudaq_wheels:
49+
type: string
50+
default: 'Custom'
51+
required: false
52+
assets_repo:
53+
type: string
54+
default: ''
55+
required: false
56+
assets_tag:
57+
type: string
58+
default: ''
59+
required: false
60+
artifacts_from_run:
61+
type: string
62+
default: ''
63+
required: false
3964

4065
concurrency:
4166
group: ${{ github.workflow }}-${{ github.ref }}
@@ -129,7 +154,7 @@ jobs:
129154
bash .github/workflows/scripts/install_git_cli.sh
130155
if [[ -n "${{ inputs.assets_repo }}" ]] && [[ -n "${{ inputs.assets_tag }}" ]]; then
131156
# Fetch the assets into this directory
132-
gh release download -R ${{ inputs.assets_repo }} ${{ inputs.assets_tag }}
157+
gh release download -R "${{ inputs.assets_repo }}" "${{ inputs.assets_tag }}"
133158
ls
134159
fi
135160
@@ -340,6 +365,7 @@ jobs:
340365
github-token: ${{ inputs.artifacts_from_run && secrets.WORKFLOW_TOKEN || github.token }}
341366

342367
- name: Test wheels
368+
shell: bash
343369
run: |
344370
# If using Custom CUDA-Q wheels, then /cudaq-wheels will exist.
345371
# Otherwise, the directory will not exist, and that is ok.
@@ -456,6 +482,7 @@ jobs:
456482
github-token: ${{ inputs.artifacts_from_run && secrets.WORKFLOW_TOKEN || github.token }}
457483

458484
- name: Test wheels
485+
shell: bash
459486
run: |
460487
# If using Custom CUDA-Q wheels, then /cudaq-wheels will exist.
461488
# Otherwise, the directory will not exist, and that is ok.

0 commit comments

Comments
 (0)