Skip to content

Commit

Permalink
Add MPI compat workflows.
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentmr committed Oct 30, 2023
1 parent c4afbd0 commit 49c8a8d
Show file tree
Hide file tree
Showing 19 changed files with 72 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/changelog_reminder.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
on:
pull_request:
#pull_request:
types: [opened, ready_for_review]

name: Changelog Reminder
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
7 changes: 7 additions & 0 deletions .github/workflows/compat-check-release-release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Compat Check w/PL - release/release

on:
pull_request:
schedule:
- cron: "0 4 * * 1-5" # Run daily at 0am Mon-Fri
workflow_dispatch:
Expand All @@ -24,6 +25,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/format.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Formatting check
on:
pull_request:
#pull_request:
push:
branches:
- master
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_gpu_kokkos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
type: string
required: true
description: The version of PennyLane to use. Valid values are either 'release' (most recent release candidate), 'stable' (most recent git-tag) or 'latest' (most recent commit from master)
pull_request:
#pull_request:
push:
branches:
- master
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
type: string
required: true
description: The version of PennyLane to use. Valid values are either 'release' (most recent release candidate), 'stable' (most recent git-tag) or 'latest' (most recent commit from master)
pull_request:
#pull_request:
push:
branches:
- master
Expand Down
39 changes: 28 additions & 11 deletions .github/workflows/tests_linux_x86_mpi_gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
push:
branches:
- main
pull_request:
#pull_request:

env:
COVERAGE_FLAGS: "--cov=pennylane_lightning --cov-report=term-missing --cov-report=xml:./coverage.xml --no-flaky-report -p no:warnings --tb=native"
Expand All @@ -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('["push", "pull_request", "release"]'), github.event_name)
runs-on:
- self-hosted
- linux
Expand Down Expand Up @@ -159,7 +159,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')
runs-on:
- self-hosted
- linux
Expand All @@ -178,12 +178,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 @@ -222,18 +229,28 @@ jobs:
echo "PIP Path => $pip_path"
echo "pip=$pip_path" >> $GITHUB_OUTPUT
- name: Install Latest PennyLane
# We want to install the latest PL on non workflow_call events
if: inputs.pennylane-version == 'latest' || inputs.pennylane-version == ''
run: python -m pip install git+https://github.com/PennyLaneAI/pennylane.git@master

- name: Install required packages
run: |
source /etc/profile.d/modules.sh && module use /opt/modules/ && module load ${{ matrix.mpilib }}
python -m pip install pip~=22.0
python -m pip install ninja cmake custatevec-cu11 pytest pytest-mock flaky pytest-cov mpi4py openfermionpyscf
python -m pip install -r requirements-dev.txt
python -m pip install cmake 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 .github/workflows/tests_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
push:
branches:
- master
pull_request:
#pull_request:

concurrency:
group: tests_windows-${{ github.ref }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_without_binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
type: string
required: true
description: The version of PennyLane to use. Valid values are either 'release' (most recent release candidate), 'stable' (most recent git-tag) or 'latest' (most recent commit from master)
pull_request:
#pull_request:
push:
branches:
- master
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update_dev_version.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Update dev version automatically
on:
pull_request:
#pull_request:

jobs:
update-dev-version:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wheel_linux_x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ env:
GCC_VERSION: 11

on:
pull_request:
#pull_request:
push:
branches:
- master
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wheel_linux_x86_64_cu11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
CUDA_VERSION_MINOR: 5

on:
pull_request:
#pull_request:
push:
branches:
- master
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wheel_macos_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: Wheel::MacOS::ARM
# **Who does it impact**: Wheels to be uploaded to PyPI.

on:
pull_request:
#pull_request:
push:
branches:
- master
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wheel_macos_x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: Wheel::MacOS::Intel
# **Who does it impact**: Wheels to be uploaded to PyPI.

on:
pull_request:
#pull_request:
push:
branches:
- master
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wheel_noarch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: Wheel::Any::None
# **Who does it impact**: Wheels to be uploaded to PyPI.

on:
pull_request:
#pull_request:
push:
branches:
- master
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wheel_win_x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: Wheel::Windows::x86_64
# **Who does it impact**: Wheels to be uploaded to PyPI.

on:
pull_request:
#pull_request:
push:
branches:
- master
Expand Down

0 comments on commit 49c8a8d

Please sign in to comment.