Skip to content

Commit

Permalink
Add MPI compat workflows. (#536)
Browse files Browse the repository at this point in the history
* Add MPI compat workflows.

* Run new workflow only

* Fix trigger.

* Fix python mpi workflows.

* Revert triggers.

* Auto update version

* Trigger CI

* Remove pull_request trigger from compat.

* Trigger CI

* Update mpitests/test_adjoint_jacobian.py

* Update changelog [skip ci].

* Auto update version

* Fix few triggers [skip ci].

* Auto update version

* trigger ci

---------

Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
vincentmr and github-actions[bot] committed Oct 31, 2023
1 parent 183bd44 commit e38639d
Show file tree
Hide file tree
Showing 10 changed files with 64 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

### Improvements

* Add the MPI test CI workflows of Lightning-GPU in compatibility cron jobs.
[(#536)] (https://github.com/PennyLaneAI/pennylane-lightning/pull/536)

* Add MPI synchronization in places to safely handle communicated data.
[(#538)](https://github.com/PennyLaneAI/pennylane-lightning/pull/538)

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/compat-check-latest-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ jobs:
with:
lightning-version: latest
pennylane-version: latest
tests_lgpu_gpu_mpi:
name: Lightning Compatibility test (tests_lgpu_gpu_mpi) - latest/latest
uses: ./.github/workflows/tests_linux_x86_mpi_gpu.yml
with:
lightning-version: latest
pennylane-version: latest
tests_without_binary:
name: Lightning Compatibility test (tests_without_binary) - latest/latest
uses: ./.github/workflows/tests_without_binary.yml
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/compat-check-latest-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ jobs:
with:
lightning-version: latest
pennylane-version: stable
tests_lgpu_gpu_mpi:
name: Lightning Compatibility test (tests_lgpu_gpu_mpi) - latest/stable
uses: ./.github/workflows/tests_linux_x86_mpi_gpu.yml
with:
lightning-version: latest
pennylane-version: stable
tests_without_binary:
name: Lightning Compatibility test (tests_without_binary) - latest/stable
uses: ./.github/workflows/tests_without_binary.yml
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/compat-check-release-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ jobs:
with:
lightning-version: release
pennylane-version: release
tests_lgpu_gpu_mpi:
name: Lightning Compatibility test (tests_lgpu_gpu_mpi) - release/release
uses: ./.github/workflows/tests_linux_x86_mpi_gpu.yml
with:
lightning-version: release
pennylane-version: release
tests_without_binary:
name: Lightning Compatibility test (tests_without_binary) - release/release
uses: ./.github/workflows/tests_without_binary.yml
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/compat-check-stable-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ jobs:
with:
lightning-version: stable
pennylane-version: latest
tests_lgpu_gpu_mpi:
name: Lightning Compatibility test (tests_lgpu_gpu_mpi) - stable/latest
uses: ./.github/workflows/tests_linux_x86_mpi_gpu.yml
with:
lightning-version: stable
pennylane-version: latest
tests_without_binary:
name: Lightning Compatibility test (tests_without_binary) - stable/latest
uses: ./.github/workflows/tests_without_binary.yml
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/compat-check-stable-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ jobs:
with:
lightning-version: stable
pennylane-version: stable
tests_lgpu_gpu_mpi:
name: Lightning Compatibility test (tests_lgpu_gpu_mpi) - stable/stable
uses: ./.github/workflows/tests_linux_x86_mpi_gpu.yml
with:
lightning-version: stable
pennylane-version: stable
tests_without_binary:
name: Lightning Compatibility test (tests_without_binary) - stable/stable
uses: ./.github/workflows/tests_without_binary.yml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_gpu_cu11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
nvidia-smi
cpptestswithLGPU_cu11:
if: ${{ github.event_name != 'workflow_call' }}
if: ${{ !contains(fromJSON('["workflow_call"]'), github.event_name) }}
needs: [builddeps]
strategy:
matrix:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tests_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ concurrency:

jobs:
cpptests:
if: ${{ github.event_name != 'workflow_call' }}
if: ${{ !contains(fromJSON('["workflow_call"]'), github.event_name) }}
strategy:
matrix:
os: [ubuntu-22.04]
Expand Down Expand Up @@ -176,7 +176,7 @@ jobs:
path: ./main/coverage-${{ github.job }}-${{ matrix.pl_backend }}.xml

cpptestswithOpenBLAS:
if: ${{ github.event_name != 'workflow_call' }}
if: ${{ !contains(fromJSON('["workflow_call"]'), github.event_name) }}
strategy:
matrix:
os: [ubuntu-22.04]
Expand Down Expand Up @@ -331,7 +331,7 @@ jobs:
os: ubuntu-22.04

cpptestswithKokkos:
if: ${{ github.event_name != 'workflow_call' }}
if: ${{ !contains(fromJSON('["workflow_call"]'), github.event_name) }}
needs: [build_and_cache_Kokkos]
strategy:
matrix:
Expand Down Expand Up @@ -582,7 +582,7 @@ jobs:

cpptestsWithMultipleBackends:
# Device-specific tests are performed for both. Device-agnostic tests default to LightningQubit.
if: ${{ github.event_name != 'workflow_call' }}
if: ${{ !contains(fromJSON('["workflow_call"]'), github.event_name) }}
needs: [build_and_cache_Kokkos]
strategy:
matrix:
Expand Down
28 changes: 25 additions & 3 deletions .github/workflows/tests_linux_x86_mpi_gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ concurrency:

jobs:
cpp_tests:
if: contains(github.event.pull_request.labels.*.name, 'ci:use-multi-gpu-runner') || (inputs.lightning-version != '' && inputs.pennylane-version != '')
if: ${{ contains(github.event.pull_request.labels.*.name, 'ci:use-multi-gpu-runner') && !contains(fromJSON('["workflow_call"]'), github.event_name) }}
runs-on:
- self-hosted
- linux
Expand Down Expand Up @@ -158,7 +158,7 @@ jobs:
python_tests:
if: contains(github.event.pull_request.labels.*.name, 'ci:use-multi-gpu-runner') || (inputs.lightning-version != '' && inputs.pennylane-version != '')
if: ${{ contains(github.event.pull_request.labels.*.name, 'ci:use-multi-gpu-runner') || contains(fromJSON('["workflow_call"]'), github.event_name) }}
runs-on:
- self-hosted
- linux
Expand All @@ -177,12 +177,19 @@ jobs:
with:
fetch-tags: true

- name: Switch to release build of Lightning
if: inputs.lightning-version == 'release'
run: |
git fetch --all
git checkout $(git branch -a --list "origin/v*rc*" | tail -1)
- name: Switch to stable build of Lightning
if: inputs.lightning-version == 'stable'
run: |
git fetch tags --force
git fetch --tags --force
git checkout $(git tag | sort -V | tail -1)
- uses: actions/setup-python@v4
id: setup_python
name: Install Python
Expand Down Expand Up @@ -228,6 +235,21 @@ jobs:
python -m pip install custatevec-cu11 mpi4py openfermionpyscf
SKIP_COMPILATION=True PL_BACKEND=lightning_qubit python -m pip install -e . -vv
- name: Checkout PennyLane for release build
if: inputs.pennylane-version == 'release'
uses: actions/checkout@v3
with:
path: pennylane
repository: PennyLaneAI/pennylane

- name: Switch to release build of PennyLane
if: inputs.pennylane-version == 'release'
run: |
cd pennylane
git fetch --all
git checkout $(git branch -a --list "origin/v*rc*" | tail -1)
python -m pip uninstall -y pennylane && python -m pip install . -vv --no-deps
- name: Build and install package
env:
CUQUANTUM_SDK: $(python -c "import site; print( f'{site.getsitepackages()[0]}/cuquantum/lib')")
Expand Down
2 changes: 1 addition & 1 deletion pennylane_lightning/core/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
Version number (major.minor.patch[-label])
"""

__version__ = "0.34.0-dev1"
__version__ = "0.34.0-dev2"

0 comments on commit e38639d

Please sign in to comment.