Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PennyLane LightningKokkos and LightningQubits tests for stable/stable #734

Merged
merged 13 commits into from
May 21, 2024
Merged
5 changes: 4 additions & 1 deletion .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

* Lightning-Kokkos' functors are rewritten as functions wrapping around generic gate and generator functors templated over a coefficient interaction function. This reduces boilerplate while clarifying how the various kernels differ from one another.
[(#640)](https://github.com/PennyLaneAI/pennylane-lightning/pull/640)

* Update C++ and Python GitHub actions names to include the matrix info.
[(#717)](https://github.com/PennyLaneAI/pennylane-lightning/pull/717)

Expand All @@ -49,6 +49,9 @@
* The `.github/workflows/tests_lkcpu_python.yml` workflow properly checks out the release or stable version of Lightning-Qubit during the test job.
[(#723)](https://github.com/PennyLaneAI/pennylane-lightning/pull/723)

* Fix PennyLane LightningKokkos and LightningQubit tests for stable/stable configuration;
[(#734)](https://github.com/PennyLaneAI/pennylane-lightning/pull/734)

### Contributors

This release contains contributions from (in alphabetical order):
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/build_and_cache_Kokkos_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@ on:
runs_on:
description: |
The runner that should run the jobs. If left blank, the value from inputs.os is used.
This is useful if you want the jobs to run in a specific runner group, while not using that group name as part
This is useful if you want the jobs to run in a specific runner group, while not using that group name as part
of the cache key.
required: false
type: string
default: ''
kokkos_version:
required: false
type: string
default: 4.3.01
outputs:
exec_model:
description: "The execution model for Kokkos."
Expand All @@ -37,7 +41,7 @@ jobs:

- name: Kokkos version
id: kokkos_version
run: echo "kokkos_version=[\"4.3.01\"]" >> $GITHUB_OUTPUT
run: echo "kokkos_version=[\"${{ inputs.kokkos_version }}\"]" >> $GITHUB_OUTPUT

outputs:
exec_model: ${{ steps.exec_model.outputs.exec_model }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_lgpu_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
run: |
cd main
git fetch --tags --force
git checkout $(git tag | sort -V | tail -1)
git checkout latest_release

- uses: actions/setup-python@v5
name: Install Python
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/tests_lgpumpi_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
if: inputs.lightning-version == 'stable'
run: |
git fetch tags --force
git checkout $(git tag | sort -V | tail -1)
git checkout latest_release
- uses: actions/setup-python@v5
id: setup_python
name: Install Python
Expand Down Expand Up @@ -191,4 +191,3 @@ jobs:
rm -rf ${{ steps.setup_venv.outputs.venv_name }}
rm -rf * .git .gitignore .github
pip cache purge

2 changes: 1 addition & 1 deletion .github/workflows/tests_lgpumpi_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
if: inputs.lightning-version == 'stable'
run: |
git fetch --tags --force
git checkout $(git tag | sort -V | tail -1)
git checkout latest_release


# Since the self-hosted runner can be re-used. It is best to set up all package
Expand Down
17 changes: 14 additions & 3 deletions .github/workflows/tests_lkcpu_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
uses: ./.github/workflows/build_and_cache_Kokkos_linux.yml
with:
os: ubuntu-22.04
kokkos_version: ${{ inputs.lightning-version == 'stable' && '4.2.00' || '4.3.01' }} #To be updated next Release.
mlxd marked this conversation as resolved.
Show resolved Hide resolved

build_lightning_kokkos_wheels:
needs: [determine_runner, build_and_cache_Kokkos]
Expand Down Expand Up @@ -80,7 +81,7 @@ jobs:
run: |
cd main
git fetch --tags --force
git checkout $(git tag | sort -V | tail -1)
git checkout latest_release
git log -1 --format='%H'
git status

Expand Down Expand Up @@ -168,7 +169,7 @@ jobs:
fetch-tags: true
path: main

- name: Switch to release build of Lightning
- name: Switch to release tag of Lightning
if: inputs.lightning-version == 'release'
run: |
cd main
Expand All @@ -180,6 +181,16 @@ jobs:
run: |
python -m pip install -U pennylane-lightning --no-deps

- name: Switch to stable tag of Lightning
if: inputs.lightning-version == 'stable'
run: |
cd main
git fetch --tags --force
git checkout latest_release
git log -1 --format='%H'
git status


- uses: actions/download-artifact@v4
with:
name: ${{ matrix.pl_backend }}-${{ matrix.exec_model }}_name.txt
Expand Down Expand Up @@ -286,4 +297,4 @@ jobs:
with:
fail_ci_if_error: true
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
token: ${{ secrets.CODECOV_TOKEN }}
AmintorDusko marked this conversation as resolved.
Show resolved Hide resolved
6 changes: 3 additions & 3 deletions .github/workflows/tests_lkcuda_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
matrix:
os: [ubuntu-22.04]
exec_model: ["CUDA"]
kokkos_version: ["4.3.01"]
kokkos_version: ["${{ inputs.lightning-version == 'stable' && '4.2.00' || '4.3.01' }}"] #To be updated next Release.

steps:
- name: Validate GPU version and installed compiler
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
os: [ubuntu-22.04]
pl_backend: ["lightning_kokkos", "all"]
exec_model: ["CUDA"]
kokkos_version: ["4.3.01"]
kokkos_version: ["${{ inputs.lightning-version == 'stable' && '4.2.00' || '4.3.01' }}"] #To be updated next Release.

name: Python Tests (${{ matrix.pl_backend }}, kokkos-${{ matrix.kokkos_version }}, model-${{ matrix.exec_model }})
runs-on:
Expand Down Expand Up @@ -161,7 +161,7 @@ jobs:
run: |
cd main
git fetch --tags --force
git checkout $(git tag | sort -V | tail -1)
git checkout latest_release
git log -1 --format='%H'
git status

Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/tests_lqcpu_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
run: |
cd main
git fetch --tags --force
git checkout $(git tag | sort -V | tail -1)
git checkout latest_release
git log -1 --format='%H'
git status

Expand Down Expand Up @@ -158,7 +158,7 @@ jobs:
mv ${{ github.workspace }}/wheel_${{ matrix.pl_backend }}-${{ matrix.blas }}.whl ${{ github.workspace }}/$WHEEL_NAME
python -m pip install -r requirements-dev.txt
python -m pip install openfermionpyscf
python -m pip install ${{ github.workspace }}/$WHEEL_NAME --no-deps
python -m pip install ${{ github.workspace }}/$WHEEL_NAME --no-deps --force-reinstall
AmintorDusko marked this conversation as resolved.
Show resolved Hide resolved

- name: Checkout PennyLane for release build
if: inputs.pennylane-version == 'release'
Expand All @@ -179,14 +179,23 @@ jobs:
if: inputs.pennylane-version == 'stable'
run: |
cd main
python -m pip uninstall -y pennylane && python -m pip install -U pennylane
python -m pip uninstall -y pennylane && python -m pip install -U pennylane --no-deps

- 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
python -m pip install --upgrade "jax[cpu]" # This also installs jaxlib
python -m pip install --upgrade tensorflow~=$TF_VERSION keras~=$TF_VERSION

- name: Switch to stable tag of Lightning
if: inputs.lightning-version == 'stable'
run: |
cd main
git fetch --tags --force
git checkout latest_release
git log -1 --format='%H'
git status

- name: Run PennyLane-Lightning unit tests
run: |
# TODO: Remove installing pytest-xdist with release v0.36.0
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 @@ -60,7 +60,7 @@ jobs:
run: |
cd main
git fetch --tags --force
git checkout $(git tag | sort -V | tail -1)
git checkout latest_release
git log -1 --format='%H'
git status

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.37.0-dev14"
__version__ = "0.37.0-dev15"
Loading