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 1 commit
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
Prev Previous commit
Next Next commit
downgrade Kokkos
  • Loading branch information
AmintorDusko committed May 24, 2024
commit 4ea0ce1681c54e8aa10506e0dd31c828228998cd
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
2 changes: 1 addition & 1 deletion .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: ${{ inputs.lightning-version == 'stable' && '4.2.00' || '4.2.00' }} #To be updated next Release.

build_lightning_kokkos_wheels:
needs: [determine_runner, build_and_cache_Kokkos]
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
4 changes: 2 additions & 2 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: ["${{ inputs.lightning-version == 'stable' && '4.2.00' || '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: ["${{ inputs.lightning-version == 'stable' && '4.2.00' || '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
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
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,9 +70,9 @@
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>
void applyPauliY(Kokkos::View<Kokkos::complex<PrecisionT> *> arr_,
Expand Down Expand Up @@ -318,7 +318,7 @@
[[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 +368,7 @@
[[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 +765,7 @@
[[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 +785,7 @@
[[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 Expand Up @@ -1185,5 +1185,5 @@
PL_ABORT("Gate operation does not exist.");
}
}

Check notice on line 1188 in pennylane_lightning/core/src/simulators/lightning_kokkos/gates/BasicGateFunctors.hpp

View check run for this annotation

codefactor.io / CodeFactor

pennylane_lightning/core/src/simulators/lightning_kokkos/gates/BasicGateFunctors.hpp#L1188

Redundant blank line at the end of a code block should be deleted. (whitespace/blank_line)
} // namespace Pennylane::LightningKokkos::Functors
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
Loading