Skip to content

Commit

Permalink
Merge branch 'master' into v0.33.0_rc
Browse files Browse the repository at this point in the history
  • Loading branch information
multiphaseCFD committed Oct 26, 2023
2 parents bde0102 + bebe551 commit 0b3d0d7
Show file tree
Hide file tree
Showing 7 changed files with 142 additions and 34 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/compat-check-latest-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,30 @@ name: Compat Check w/PL - latest/latest

on:
schedule:
- cron: "0 3 * * 1-5" # Run daily at 3am Mon-Fri
- cron: "0 0 * * 1-5" # Run daily at 0am Mon-Fri
workflow_dispatch:

jobs:
tests_linux:
name: Lightning-Kokkos Compatibility test (tests_linux) - latest/latest
name: Lightning Compatibility test (tests_linux) - latest/latest
uses: ./.github/workflows/tests_linux.yml
with:
lightning-version: latest
pennylane-version: latest
tests_lkokkos_gpu:
name: Lightning Compatibility test (tests_lkokkos_gpu) - latest/latest
uses: ./.github/workflows/tests_gpu_kokkos.yml
with:
lightning-version: latest
pennylane-version: latest
tests_lgpu_gpu:
name: Lightning Compatibility test (tests_lgpu_gpu) - latest/latest
uses: ./.github/workflows/tests_gpu_cu11.yml
with:
lightning-version: latest
pennylane-version: latest
tests_without_binary:
name: Lightning-Kokkos Compatibility test (tests_without_binary) - latest/latest
name: Lightning Compatibility test (tests_without_binary) - latest/latest
uses: ./.github/workflows/tests_without_binary.yml
with:
lightning-version: latest
Expand Down
18 changes: 15 additions & 3 deletions .github/workflows/compat-check-latest-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,30 @@ name: Compat Check w/PL - latest/stable

on:
schedule:
- cron: "0 3 * * 1-5" # Run daily at 3am Mon-Fri
- cron: "0 1 * * 1-5" # Run daily at 3am Mon-Fri
workflow_dispatch:

jobs:
tests_linux:
name: Lightning-Kokkos Compatibility test (tests_linux) - latest/stable
name: Lightning Compatibility test (tests_linux) - latest/stable
uses: ./.github/workflows/tests_linux.yml
with:
lightning-version: latest
pennylane-version: stable
tests_lkokkos_gpu:
name: Lightning Compatibility test (tests_lkokkos_gpu) - latest/stable
uses: ./.github/workflows/tests_gpu_kokkos.yml
with:
lightning-version: latest
pennylane-version: stable
tests_lgpu_gpu:
name: Lightning Compatibility test (tests_lgpu_gpu) - latest/stable
uses: ./.github/workflows/tests_gpu_cu11.yml
with:
lightning-version: latest
pennylane-version: stable
tests_without_binary:
name: Lightning-Kokkos Compatibility test (tests_without_binary) - latest/stable
name: Lightning Compatibility test (tests_without_binary) - latest/stable
uses: ./.github/workflows/tests_without_binary.yml
with:
lightning-version: latest
Expand Down
18 changes: 15 additions & 3 deletions .github/workflows/compat-check-stable-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,30 @@ name: Compat Check w/PL - stable/latest

on:
schedule:
- cron: "0 3 * * 1-5" # Run daily at 3am Mon-Fri
- cron: "0 2 * * 1-5" # Run daily at 3am Mon-Fri
workflow_dispatch:

jobs:
tests_linux:
name: Lightning-Kokkos Compatibility test (tests_linux) - stable/latest
name: Lightning Compatibility test (tests_linux) - stable/latest
uses: ./.github/workflows/tests_linux.yml
with:
lightning-version: stable
pennylane-version: latest
tests_lkokkos_gpu:
name: Lightning Compatibility test (tests_lkokkos_gpu) - stable/latest
uses: ./.github/workflows/tests_gpu_kokkos.yml
with:
lightning-version: stable
pennylane-version: latest
tests_lgpu_gpu:
name: Lightning Compatibility test (tests_lgpu_gpu) - stable/latest
uses: ./.github/workflows/tests_gpu_cu11.yml
with:
lightning-version: stable
pennylane-version: latest
tests_without_binary:
name: Lightning-Kokkos Compatibility test (tests_without_binary) - stable/latest
name: Lightning Compatibility test (tests_without_binary) - stable/latest
uses: ./.github/workflows/tests_without_binary.yml
with:
lightning-version: stable
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/compat-check-stable-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,25 @@ on:

jobs:
tests_linux:
name: Lightning-Kokkos Compatibility test (tests_linux) - stable/stable
name: Lightning Compatibility test (tests_linux) - stable/stable
uses: ./.github/workflows/tests_linux.yml
with:
lightning-version: stable
pennylane-version: stable
tests_lkokkos_gpu:
name: Lightning Compatibility test (tests_lkokkos_gpu) - stable/stable
uses: ./.github/workflows/tests_gpu_kokkos.yml
with:
lightning-version: stable
pennylane-version: stable
tests_lgpu_gpu:
name: Lightning Compatibility test (tests_lgpu_gpu) - stable/stable
uses: ./.github/workflows/tests_gpu_cu11.yml
with:
lightning-version: stable
pennylane-version: stable
tests_without_binary:
name: Lightning-Kokkos Compatibility test (tests_without_binary) - stable/stable
name: Lightning Compatibility test (tests_without_binary) - stable/stable
uses: ./.github/workflows/tests_without_binary.yml
with:
lightning-version: stable
Expand Down
53 changes: 42 additions & 11 deletions .github/workflows/tests_gpu_cu11.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
name: Testing::Linux::x86_64::LGPU
on:
pull_request:
push:
branches:
- master
workflow_run:
workflows: ["Testing::LKokkos::CUDA"]
types:
- completed
workflow_call:
inputs:
lightning-version:
type: string
required: true
description: The version of lightning to use. Valid values are either 'stable' (most recent git-tag) or 'latest' (most recent commit from master)
pennylane-version:
type: string
required: true
description: The version of PennyLane to use. Valid values are either 'stable' (most recent git-tag) or 'latest' (most recent commit from master)

env:
CI_CUDA_ARCH: 86
Expand Down Expand Up @@ -41,14 +51,18 @@ jobs:
nvidia-smi
cpptestswithLGPU_cu11:
if: ${{ github.event_name != 'workflow_call' }}
needs: [builddeps]
strategy:
matrix:
os: [ubuntu-22.04]
pl_backend: ["lightning_gpu"]

name: C++ tests (Lightning-GPU)
runs-on: ${{ matrix.os }}
runs-on:
- ${{ matrix.os }}
- self-hosted
- gpu

steps:
- name: Validate GPU version and installed compiler
Expand Down Expand Up @@ -102,10 +116,8 @@ jobs:
- name: Install required packages
run: |
cd main
python -m pip install -r requirements-dev.txt
python -m pip install cmake custatevec-cu11
python -m pip install ninja cmake custatevec-cu11
- name: Build and run unit tests
run: |
cd main
Expand Down Expand Up @@ -140,15 +152,18 @@ jobs:
if-no-files-found: error

pythontestswithLGPU:
needs: [builddeps, cpptestswithLGPU_cu11]
needs: [builddeps]
strategy:
matrix:
os: [ubuntu-22.04]
pl_backend: ["lightning_gpu"]
default_backend: ["lightning_qubit"]

name: Python tests with LGPU
runs-on: ${{ matrix.os }}
runs-on:
- ${{ matrix.os }}
- self-hosted
- gpu

steps:
- name: Validate GPU version and installed compiler
Expand All @@ -164,8 +179,18 @@ jobs:
- name: Checkout PennyLane-Lightning
uses: actions/checkout@v3
with:
fetch-tags: true
path: main

- name: Switch to stable build of Lightning
if: inputs.lightning-version == 'stable'
run: |
cd main
git fetch --tags --force
git checkout $(git tag | sort -V | tail -1)
git log -1 --format='%H'
git status
- uses: actions/setup-python@v4
name: Install Python
with:
Expand Down Expand Up @@ -207,6 +232,12 @@ jobs:
python -m pip install -r requirements-dev.txt
python -m pip install cmake custatevec-cu11 openfermionpyscf
- name: Install Stable PennyLane
if: inputs.pennylane-version == 'stable'
run: |
cd main
python -m pip uninstall -y pennylane && python -m pip install -U pennylane
- name: Build and install package
env:
CUQUANTUM_SDK: $(python -c "import site; print( f'{site.getsitepackages()[0]}/cuquantum')")
Expand Down
42 changes: 34 additions & 8 deletions .github/workflows/tests_gpu_kokkos.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
name: Testing::LKokkos::GPU
on:
workflow_call:
inputs:
lightning-version:
type: string
required: true
description: The version of lightning to use. Valid values are either 'stable' (most recent git-tag) or 'latest' (most recent commit from master)
pennylane-version:
type: string
required: true
description: The version of PennyLane to use. Valid values are either 'stable' (most recent git-tag) or 'latest' (most recent commit from master)
pull_request:
push:
branches:
Expand All @@ -14,7 +24,7 @@ env:
TORCH_VERSION: 1.11.0+cpu

concurrency:
group: tests_gpu-${{ github.ref }}
group: tests_gpu-${{ github.ref }}-${{ inputs.lightning-version }}-${{ inputs.pennylane-version }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -73,7 +83,7 @@ jobs:
cd -
- name: Test Kokkos core library (Ubuntu)
env:
env:
CMAKE_PREFIX_PATH: ${{ github.workspace }}/Kokkos_install/${{ matrix.exec_model }}
run: |
set -x
Expand Down Expand Up @@ -103,11 +113,11 @@ jobs:
kokkos_version: ["4.1.00"]

name: C++ tests (Kokkos)
runs-on:
runs-on:
- ${{ matrix.os }}
- self-hosted
- gpu

steps:
- name: Validate GPU version and installed compiler
run: |
Expand Down Expand Up @@ -190,11 +200,11 @@ jobs:
kokkos_version: ["4.1.00"]

name: Python tests with Kokkos
runs-on:
runs-on:
- ${{ matrix.os }}
- self-hosted
- gpu

steps:
- name: Validate GPU version and installed compiler
run: |
Expand Down Expand Up @@ -224,6 +234,16 @@ jobs:
uses: actions/checkout@v3
with:
path: main
fetch-tags: true

- name: Switch to stable build of Lightning
if: inputs.lightning-version == 'stable'
run: |
cd main
git fetch --tags --force
git checkout $(git tag | sort -V | tail -1)
git log -1 --format='%H'
git status
- uses: actions/setup-python@v4
name: Install Python
Expand All @@ -239,6 +259,12 @@ jobs:
python -m pip install -r requirements-dev.txt
python -m pip install openfermionpyscf
- name: Install Stable PennyLane
if: inputs.pennylane-version == 'stable'
run: |
cd main
python -m pip uninstall -y pennylane && python -m pip install -U pennylane
- name: Install ML libraries for interfaces
run: |
python -m pip install --upgrade torch==$TORCH_VERSION -f https://download.pytorch.org/whl/cpu/torch_stable.html
Expand All @@ -256,7 +282,7 @@ jobs:
- name: Run PennyLane-Lightning unit tests
if: ${{ matrix.pl_backend != 'all'}}
env:
env:
OMP_NUM_THREADS: 1
OMP_PROC_BIND: false
run: |
Expand All @@ -279,7 +305,7 @@ jobs:
- name: Run PennyLane-Lightning unit tests for lightning.qubit with all devices installed
if: ${{ matrix.pl_backend == 'all' }}
env:
env:
OMP_NUM_THREADS: 1
OMP_PROC_BIND: false
run: |
Expand Down
Loading

0 comments on commit 0b3d0d7

Please sign in to comment.