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

Checking CIs #741

Closed
wants to merge 12 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build_and_cache_Kokkos_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:
kokkos_version:
required: false
type: string
default: 4.3.01
default: 4.2.00
outputs:
exec_model:
description: "The execution model for Kokkos."
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/set_wheel_build_matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:

- name: Kokkos version
id: kokkos_version
run: echo "kokkos_version=[\"4.3.01\"]" >> $GITHUB_OUTPUT
run: echo "kokkos_version=[\"4.2.00\"]" >> $GITHUB_OUTPUT

outputs:
python_version: ${{ steps.pyver.outputs.python_version }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests_lkcpu_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +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.
kokkos_version: '4.2.00' #To be updated next Release.

build_lightning_kokkos_wheels:
needs: [determine_runner, build_and_cache_Kokkos]
Expand Down Expand Up @@ -246,7 +246,7 @@ jobs:
python -m pip install pytest-xdist
cd main/
DEVICENAME=`echo ${{ matrix.pl_backend }} | sed "s/_/./g"`
PL_DEVICE=${DEVICENAME} python -m pytest tests/ --exitfirst $COVERAGE_FLAGS --splits 7 --group ${{ matrix.group }} \
PL_DEVICE=${DEVICENAME} python -m pytest tests/ $COVERAGE_FLAGS --splits 7 --group ${{ matrix.group }} \
--store-durations --durations-path='.github/workflows/python_lightning_kokkos_test_durations.json' --splitting-algorithm=least_duration
mv .github/workflows/python_lightning_kokkos_test_durations.json ${{ github.workspace }}/.test_durations-${{ matrix.exec_model }}-${{ matrix.group }}
pl-device-test --device ${DEVICENAME} --skip-ops --shots=20000 $COVERAGE_FLAGS --cov-append
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests_lkcuda_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
matrix:
os: [ubuntu-22.04]
exec_model: ["CUDA"]
kokkos_version: ["4.3.01"]
kokkos_version: ["4.2.00"]

steps:
- name: Validate GPU version and installed compiler
Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:
os: [ubuntu-22.04]
pl_backend: ["lightning_kokkos"]
exec_model: ["CUDA"]
kokkos_version: ["4.3.01"]
kokkos_version: ["4.2.00"]

name: C++ Tests (${{ matrix.pl_backend }}, kokkos-${{ matrix.kokkos_version }}, model-${{ matrix.exec_model }})
runs-on:
Expand Down
11 changes: 6 additions & 5 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: ["${{ inputs.lightning-version == 'stable' && '4.2.00' || '4.3.01' }}"] #To be updated next Release.
kokkos_version: ["'4.2.00'"] #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: ["${{ inputs.lightning-version == 'stable' && '4.2.00' || '4.3.01' }}"] #To be updated next Release.
kokkos_version: ["'4.2.00'"] #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 @@ -223,9 +223,9 @@ jobs:
run: |
cd main/
DEVICENAME=`echo ${{ matrix.pl_backend }} | sed "s/_/./g"`
PL_DEVICE=${DEVICENAME} python -m pytest tests/ -k "not test_native_mcm" $COVERAGE_FLAGS 2> /dev/null || echo Something went wrong with Pytest
pl-device-test --device ${DEVICENAME} --skip-ops --shots=20000 $COVERAGE_FLAGS --cov-append 2> /dev/null || echo Something went wrong with pl-device-test shot=20000
pl-device-test --device ${DEVICENAME} --shots=None --skip-ops $COVERAGE_FLAGS --cov-append 2> /dev/null || echo Something went wrong with pl-device-test shot=None
PL_DEVICE=${DEVICENAME} python -m pytest tests/ -k "not test_native_mcm" $COVERAGE_FLAGS
pl-device-test --device ${DEVICENAME} --skip-ops --shots=20000 $COVERAGE_FLAGS --cov-append
pl-device-test --device ${DEVICENAME} --shots=None --skip-ops $COVERAGE_FLAGS --cov-append
mv coverage.xml coverage-${{ github.job }}-${{ matrix.pl_backend }}.xml

- name: Install all backend devices
Expand All @@ -246,6 +246,7 @@ jobs:
run: |
cd main/
for device in lightning.qubit lightning.kokkos; do
PL_DEVICE=${device} python -m pytest tests/ -k "not test_native_mcm" $COVERAGE_FLAGS
pl-device-test --device ${device} --skip-ops --shots=20000 $COVERAGE_FLAGS --cov-append
pl-device-test --device ${device} --shots=None --skip-ops $COVERAGE_FLAGS --cov-append
done
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_windows_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

- name: Kokkos version
id: kokkos_version
run: echo "kokkos_version=[\"4.3.01\"]" >> $GITHUB_OUTPUT
run: echo "kokkos_version=[\"4.2.00\"]" >> $GITHUB_OUTPUT

outputs:
exec_model: ${{ steps.exec_model.outputs.exec_model }}
Expand Down
2 changes: 1 addition & 1 deletion cmake/support_kokkos.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Include this file only once
include_guard()

set(KOKKOS_VERSION 4.3.01)
set(KOKKOS_VERSION 4.2.00)

# Macro to aid in finding Kokkos with 3 potential install options:
# 1. Fully integrated Kokkos packages and CMake module files
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ARG AMD_ARCH=AMD_GFX90A
ARG CUDA_ARCH=AMPERE80
ARG CUDA_INSTALLER=https://developer.download.nvidia.com/compute/cuda/12.2.2/local_installers/cuda_12.2.2_535.104.05_linux.run
ARG GCC_VERSION=11
ARG KOKKOS_VERSION=4.3.01
ARG KOKKOS_VERSION=4.2.00
ARG LIGHTNING_VERSION=v0.36.0
ARG ROCM_INSTALLER=https://repo.radeon.com/amdgpu-install/5.7/ubuntu/jammy/amdgpu-install_5.7.50700-1_all.deb
RUN apt-get update \
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-dev18"
__version__ = "0.37.0-dev19"
2 changes: 1 addition & 1 deletion pennylane_lightning/core/lightning_base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2018-2023 Xanadu Quantum Technologies Inc.
# Copyright 2024 Xanadu Quantum Technologies Inc.

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/// @cond DEV
namespace {
using namespace Pennylane::Util;
using Kokkos::kokkos_swap;
using Kokkos::Experimental::swap;
using Pennylane::Gates::GateOperation;
} // namespace
/// @endcond
Expand Down Expand Up @@ -70,8 +70,9 @@ void applyPauliX(Kokkos::View<Kokkos::complex<PrecisionT> *> arr_,
applyNC1Functor(
ExecutionSpace{}, arr_, num_qubits, wires,
KOKKOS_LAMBDA(Kokkos::View<Kokkos::complex<PrecisionT> *> arr,
const std::size_t i0,
const std::size_t i1) { kokkos_swap(arr(i0), arr(i1)); });
const std::size_t i0, const std::size_t i1) {
Kokkos::Experimental::swap(arr(i0), arr(i1));
});
}

template <class ExecutionSpace, class PrecisionT>
Expand Down Expand Up @@ -318,7 +319,7 @@ void applyCNOT(Kokkos::View<Kokkos::complex<PrecisionT> *> arr_,
[[maybe_unused]] const std::size_t i00,
[[maybe_unused]] const std::size_t i01,
const std::size_t i10, const std::size_t i11) {
kokkos_swap(arr(i10), arr(i11));
Kokkos::Experimental::swap(arr(i10), arr(i11));
});
}

Expand Down Expand Up @@ -368,7 +369,7 @@ void applySWAP(Kokkos::View<Kokkos::complex<PrecisionT> *> arr_,
[[maybe_unused]] const std::size_t i00,
const std::size_t i01, const std::size_t i10,
[[maybe_unused]] const std::size_t i11) {
kokkos_swap(arr(i10), arr(i01));
Kokkos::Experimental::swap(arr(i10), arr(i01));
});
}

Expand Down Expand Up @@ -765,7 +766,7 @@ void applyCSWAP(Kokkos::View<Kokkos::complex<PrecisionT> *> arr_,
[[maybe_unused]] const std::size_t i100,
const std::size_t i101, const std::size_t i110,
[[maybe_unused]] const std::size_t i111) {
kokkos_swap(arr(i101), arr(i110));
Kokkos::Experimental::swap(arr(i101), arr(i110));
});
}

Expand All @@ -785,7 +786,7 @@ void applyToffoli(Kokkos::View<Kokkos::complex<PrecisionT> *> arr_,
[[maybe_unused]] const std::size_t i100,
[[maybe_unused]] const std::size_t i101,
const std::size_t i110, const std::size_t i111) {
kokkos_swap(arr(i111), arr(i110));
Kokkos::Experimental::swap(arr(i111), arr(i110));
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/// @cond DEV
namespace {
using namespace Pennylane::Util;
using Kokkos::kokkos_swap;
using Kokkos::Experimental::swap;
using Pennylane::Gates::GeneratorOperation;
} // namespace
/// @endcond
Expand Down Expand Up @@ -76,7 +76,7 @@ void applyGenCRX(Kokkos::View<Kokkos::complex<PrecisionT> *> arr_,
const std::size_t i10, const std::size_t i11) {
arr(i00) = ZERO<Kokkos::complex, PrecisionT>();
arr(i01) = ZERO<Kokkos::complex, PrecisionT>();
kokkos_swap(arr(i10), arr(i11));
Kokkos::Experimental::swap(arr(i10), arr(i11));
});
}

Expand Down Expand Up @@ -129,8 +129,8 @@ void applyGenIsingXX(
KOKKOS_LAMBDA(Kokkos::View<Kokkos::complex<PrecisionT> *> arr,
const std::size_t i00, const std::size_t i01,
const std::size_t i10, const std::size_t i11) {
kokkos_swap(arr(i00), arr(i11));
kokkos_swap(arr(i10), arr(i01));
Kokkos::Experimental::swap(arr(i00), arr(i11));
Kokkos::Experimental::swap(arr(i10), arr(i01));
});
}

Expand All @@ -145,7 +145,7 @@ void applyGenIsingXY(
KOKKOS_LAMBDA(Kokkos::View<Kokkos::complex<PrecisionT> *> arr,
const std::size_t i00, const std::size_t i01,
const std::size_t i10, const std::size_t i11) {
kokkos_swap(arr(i10), arr(i01));
Kokkos::Experimental::swap(arr(i10), arr(i01));
arr(i00) = ZERO<Kokkos::complex, PrecisionT>();
arr(i11) = ZERO<Kokkos::complex, PrecisionT>();
});
Expand All @@ -165,7 +165,7 @@ void applyGenIsingYY(
const auto v00 = arr(i00);
arr(i00) = -arr(i11);
arr(i11) = -v00;
kokkos_swap(arr(i10), arr(i01));
Kokkos::Experimental::swap(arr(i10), arr(i01));
});
}

Expand Down Expand Up @@ -201,7 +201,7 @@ void applyGenSingleExcitation(
arr(i01) *= IMAG<Kokkos::complex, PrecisionT>();
arr(i10) *= -IMAG<Kokkos::complex, PrecisionT>();
arr(i11) = ZERO<Kokkos::complex, PrecisionT>();
kokkos_swap(arr(i10), arr(i01));
Kokkos::Experimental::swap(arr(i10), arr(i01));
});
}

Expand All @@ -219,7 +219,7 @@ void applyGenSingleExcitationMinus(
[[maybe_unused]] const std::size_t i11) {
arr(i01) *= IMAG<Kokkos::complex, PrecisionT>();
arr(i10) *= -IMAG<Kokkos::complex, PrecisionT>();
kokkos_swap(arr(i10), arr(i01));
Kokkos::Experimental::swap(arr(i10), arr(i01));
});
}

Expand All @@ -239,7 +239,7 @@ void applyGenSingleExcitationPlus(
arr(i01) *= IMAG<Kokkos::complex, PrecisionT>();
arr(i10) *= -IMAG<Kokkos::complex, PrecisionT>();
arr(i11) *= -1;
kokkos_swap(arr(i10), arr(i01));
Kokkos::Experimental::swap(arr(i10), arr(i01));
});
}

Expand Down Expand Up @@ -307,7 +307,7 @@ void applyGenDoubleExcitationMinus(
[[maybe_unused]] const std::size_t i1111) {
arr(i0011) *= IMAG<Kokkos::complex, PrecisionT>();
arr(i1100) *= -IMAG<Kokkos::complex, PrecisionT>();
kokkos_swap(arr(i1100), arr(i0011));
Kokkos::Experimental::swap(arr(i1100), arr(i0011));
});
}

Expand Down Expand Up @@ -337,7 +337,7 @@ void applyGenDoubleExcitationPlus(
[[maybe_unused]] const std::size_t i1111) {
arr(i0011) *= -IMAG<Kokkos::complex, PrecisionT>();
arr(i1100) *= IMAG<Kokkos::complex, PrecisionT>();
kokkos_swap(arr(i1100), arr(i0011));
Kokkos::Experimental::swap(arr(i1100), arr(i0011));
});
}

Expand Down
2 changes: 1 addition & 1 deletion pennylane_lightning/lightning_gpu/lightning_gpu.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022-2023 Xanadu Quantum Technologies Inc.
# Copyright 2024 Xanadu Quantum Technologies Inc.

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion pennylane_lightning/lightning_kokkos/lightning_kokkos.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2018-2023 Xanadu Quantum Technologies Inc.
# Copyright 2024 Xanadu Quantum Technologies Inc.

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion pennylane_lightning/lightning_qubit/lightning_qubit.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2018-2024 Xanadu Quantum Technologies Inc.
# Copyright 2024 Xanadu Quantum Technologies Inc.

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions pennylane_lightning/lightning_tensor/lightning_tensor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2018-2024 Xanadu Quantum Technologies Inc.
# Copyright 2024 Xanadu Quantum Technologies Inc.

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,7 +13,7 @@
# limitations under the License.
"""
This module contains the LightningTensor class that inherits from the new device interface.
It is a device to perform tensor network simulation of a quantum circuit.
It is a device to perform tensor network simulation of a quantum circuit.
"""
from dataclasses import replace
from numbers import Number
Expand Down
Loading