Skip to content

Commit 0f6496d

Browse files
authored
Merge branch 'main' into dynamics_cpp_operators
2 parents b26a440 + 1a4f99e commit 0f6496d

File tree

173 files changed

+4254
-1636
lines changed

Some content is hidden

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

173 files changed

+4254
-1636
lines changed
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
nvidia-mgpu-repo: cuda-quantum/cuquantum-mgpu.git
2-
nvidia-mgpu-commit: 5ecebd6b7642e8526baf5930634f2f854aef9ea7
2+
nvidia-mgpu-commit: dadce3edc10564e94cd260590344d5840880087a

.github/workflows/config/spelling_allowlist.txt

+3
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ Hadamards
4545
Hamiltonian
4646
Hamiltonians
4747
IQM
48+
InfiniBand
49+
Infleqtion
4850
IonQ
4951
JIT
5052
JSON
@@ -104,6 +106,7 @@ SLED
104106
SLES
105107
SLURM
106108
SVD
109+
Stim
107110
Superpositions
108111
TBI
109112
TCP

.github/workflows/deployments.yml

+37-12
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,14 @@ jobs:
6363
pull_request_number: ${{ steps.pr_info.outputs.pr_number }}
6464
pull_request_base: ${{ steps.pr_info.outputs.pr_base }}
6565
pull_request_commit: ${{ steps.pr_info.outputs.merge_commit }}
66-
llvm_commit: ${{ steps.repo_info.outputs.llvm_commit }}
67-
pybind11_commit: ${{ steps.repo_info.outputs.pybind11_commit }}
66+
llvm_commit: ${{ steps.build_config.outputs.llvm_commit }}
67+
pybind11_commit: ${{ steps.build_config.outputs.pybind11_commit }}
6868
cache_base: ${{ steps.build_info.outputs.cache_base }}
6969
cache_target: ${{ steps.build_info.outputs.cache_target }}
7070
multi_platform: ${{ steps.build_info.outputs.multi_platform }}
7171
platforms: ${{ steps.build_info.outputs.platforms }}
72+
build_dependencies: ${{ steps.build_config.outputs.build_dependencies }}
73+
create_packages: ${{ steps.build_config.outputs.create_packages }}
7274
environment: ${{ steps.build_info.outputs.environment }}
7375

7476
steps:
@@ -159,15 +161,22 @@ jobs:
159161
ref: "${{ steps.pr_info.outputs.merge_commit }}"
160162

161163
- name: Configure build
162-
id: repo_info
164+
id: build_config
163165
run: |
164166
echo "llvm_commit=$(git rev-parse @:./tpls/llvm)" >> $GITHUB_OUTPUT
165167
echo "pybind11_commit=$(git rev-parse @:./tpls/pybind11)" >> $GITHUB_OUTPUT
166168
169+
if ${{ github.event_name != 'workflow_run' || steps.pr_info.outputs.pr_number != '' }}; then
170+
echo "build_dependencies=true" >> $GITHUB_OUTPUT
171+
fi
172+
if ${{ github.event_name == 'workflow_dispatch' && ! inputs.update_registry_cache }}; then
173+
echo "create_packages=true" >> $GITHUB_OUTPUT
174+
fi
175+
167176
devdeps:
168177
name: Build dev dependencies
169178
needs: metadata
170-
if: github.event_name != 'workflow_run' || needs.metadata.outputs.pull_request_number != ''
179+
if: needs.metadata.outputs.build_dependencies == 'true'
171180
strategy:
172181
matrix:
173182
platform: ${{ fromJson(needs.metadata.outputs.multi_platform || needs.metadata.outputs.platforms).ids }}
@@ -195,7 +204,7 @@ jobs:
195204
wheeldeps:
196205
name: Build wheel dependencies
197206
needs: metadata
198-
if: github.event_name != 'workflow_run' || needs.metadata.outputs.pull_request_number != ''
207+
if: needs.metadata.outputs.build_dependencies == 'true'
199208
strategy:
200209
matrix:
201210
# There are currently no multi-platform manylinux images available.
@@ -229,7 +238,7 @@ jobs:
229238
source_build:
230239
name: Build cross-platform dependencies
231240
needs: metadata
232-
if: github.event_name != 'workflow_run' || needs.metadata.outputs.pull_request_number != ''
241+
if: needs.metadata.outputs.build_dependencies == 'true'
233242
strategy:
234243
matrix:
235244
platform: ${{ fromJson(needs.metadata.outputs.platforms).ids }}
@@ -260,7 +269,7 @@ jobs:
260269
openmpi:
261270
name: Build Open MPI
262271
needs: metadata
263-
if: github.event_name != 'workflow_run' || needs.metadata.outputs.pull_request_number != ''
272+
if: needs.metadata.outputs.build_dependencies == 'true'
264273
strategy:
265274
matrix:
266275
platform: ${{ fromJson(needs.metadata.outputs.multi_platform || needs.metadata.outputs.platforms).ids }}
@@ -311,20 +320,36 @@ jobs:
311320
# https://github.com/actions/runner/pull/2477
312321
config:
313322
name: Configure build
314-
needs: [devdeps, wheeldeps, source_build, openmpi]
315-
if: github.event_name == 'workflow_dispatch' && ! inputs.update_registry_cache
323+
needs: [metadata, devdeps, wheeldeps, source_build, openmpi]
324+
if: needs.metadata.outputs.create_packages == 'true'
316325
runs-on: ubuntu-latest
317326

318327
outputs:
319328
json: "${{ steps.read_json.outputs.result }}"
320-
devdeps_toolchain: gcc11
321329

322330
steps:
323331
- uses: cloudposse/[email protected]
324332
id: read_json
325333
with:
326334
matrix-step-name: dev_environment
327335

336+
coverage:
337+
name: Update code coverage
338+
needs: [metadata, config]
339+
if: needs.metadata.outputs.multi_platform != ''
340+
strategy:
341+
matrix:
342+
platform: [amd64]
343+
toolchain: [clang16]
344+
fail-fast: false
345+
uses: ./.github/workflows/generate_cc.yml
346+
secrets:
347+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
348+
with:
349+
platform: linux/${{ matrix.platform }}
350+
devdeps_image: ${{ fromJson(needs.config.outputs.json).image_hash[format('{0}-{1}', fromJson(needs.metadata.outputs.multi_platform).ids[0], matrix.toolchain)] }}
351+
export_environment: false
352+
328353
extdevdeps:
329354
name: Create dev environment
330355
needs: [metadata, config, openmpi]
@@ -340,10 +365,10 @@ jobs:
340365
with:
341366
platforms: ${{ fromJson(needs.metadata.outputs.multi_platform || needs.metadata.outputs.platforms)[format('{0}', matrix.platform)].docker_flag }}
342367
dockerfile: build/devdeps.ext.Dockerfile
343-
build_config_id: cu${{ matrix.cuda_version }}-${{ needs.config.outputs.devdeps_toolchain }}
368+
build_config_id: cu${{ matrix.cuda_version }}-gcc11
344369
build_args: |
345370
cuda_version=${{ matrix.cuda_version }}
346-
base_image=${{ fromJson(needs.config.outputs.json).image_hash[format('{0}-{1}', matrix.platform, needs.config.outputs.devdeps_toolchain)] }}
371+
base_image=${{ fromJson(needs.config.outputs.json).image_hash[format('{0}-gcc11', matrix.platform)] }}
347372
ompidev_image=${{ fromJson(needs.config.outputs.json).image_hash[format('{0}-cu{1}-ompi', matrix.platform, matrix.cuda_version)] }}
348373
${{ matrix.cuda_version != '11.8' && 'cuda_packages=cuda-cudart cuda-nvrtc cuda-compiler libcublas-dev libcusolver libnvjitlink' || '' }}
349374
registry_cache_from: ${{ needs.metadata.outputs.cache_base }}

.github/workflows/docker_images.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ jobs:
694694
fi
695695
696696
image_tag=`docker inspect $cudaq_image --format='{{json .Config.Labels}}' | jq -r '."org.opencontainers.image.version"'`
697-
docs_version="CUDA_QUANTUM_VERSION=${image_tag%-base}"
697+
docs_version="CUDA_QUANTUM_VERSION=$(echo $image_tag | sed -re 's/^(cu[0-9]+-)?(.*)-base$/\2/')"
698698
docker image rm $cudaq_image
699699
docker image prune --force
700700

.github/workflows/generate_cc.yml

+12-11
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ on:
99
required: false
1010
type: string
1111
devdeps_cache:
12-
required: true
12+
required: false
1313
type: string
1414
devdeps_archive:
15-
required: true
15+
required: false
1616
type: string
1717
export_environment:
1818
required: false
@@ -33,24 +33,25 @@ jobs:
3333
steps:
3434
- name: Checkout Repository
3535
uses: actions/checkout@v4
36-
37-
- name: Restore environment
38-
id: restore_devdeps
39-
if: inputs.devdeps_image == ''
40-
uses: actions/cache/restore@v4
4136
with:
42-
path: ${{ inputs.devdeps_archive }}
43-
key: ${{ inputs.devdeps_cache }}
44-
fail-on-cache-miss: true
37+
persist-credentials: false
4538

4639
- name: Log in to GitHub CR
47-
if: inputs.devdeps_image != ''
4840
uses: docker/login-action@v3
4941
with:
5042
registry: ghcr.io
5143
username: ${{ github.actor }}
5244
password: ${{ github.token }}
5345

46+
- name: Restore environment
47+
id: restore_devdeps
48+
if: inputs.devdeps_cache && inputs.devdeps_archive
49+
uses: actions/cache/restore@v4
50+
with:
51+
path: ${{ inputs.devdeps_archive }}
52+
key: ${{ inputs.devdeps_cache }}
53+
fail-on-cache-miss: true
54+
5455
- name: Set up context for buildx
5556
run: |
5657
docker context create builder_context

0 commit comments

Comments
 (0)