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
1920jobs :
@@ -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}', inputs.release-number, matrix.runner.arch)
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
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 }}
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
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 :
0 commit comments