From 69618de0b310c48b60c6975c4c7cb19f0c54d8f1 Mon Sep 17 00:00:00 2001 From: Lee James O'Riordan Date: Fri, 17 May 2024 11:53:00 -0400 Subject: [PATCH] Bump Kokkos version to 4.3.01 (#725) * Bump Kokkos version * Auto update version from '0.37.0-dev6' to '0.37.0-dev8' * Auto update version from '0.37.0-dev8' to '0.37.0-dev9' * Replace all Kokkos versions with 4.3 to update cache * Auto update version from '0.37.0-dev9' to '0.37.0-dev10' * Update changelog * Auto update version from '0.37.0-dev11' to '0.37.0-dev12' * Auto update version from '0.37.0-dev12' to '0.37.0-dev13' * Fix warning: moving a temporary object prevents copy elision * Ensure kokkos_swap used throughout * Auto update version from '0.37.0-dev13' to '0.37.0-dev14' --------- Co-authored-by: ringo-but-quantum --- .github/CHANGELOG.md | 3 +++ .../build_and_cache_Kokkos_linux.yml | 2 +- .github/workflows/set_wheel_build_matrix.yml | 2 +- .github/workflows/tests_lkcuda_cpp.yml | 4 ++-- .github/workflows/tests_lkcuda_python.yml | 4 ++-- .github/workflows/tests_windows_cpp.yml | 2 +- cmake/support_kokkos.cmake | 2 +- docker/Dockerfile | 4 ++-- pennylane_lightning/core/src/gates/Gates.hpp | 2 +- .../gates/BasicGateFunctors.hpp | 18 +++++++-------- .../gates/BasicGeneratorFunctors.hpp | 22 +++++++++---------- 11 files changed, 34 insertions(+), 31 deletions(-) diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index f604722897..e4e9ae722e 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -21,6 +21,9 @@ ### Improvements +* Updated Kokkos version and support to 4.3.01. + [(#725)](https://github.com/PennyLaneAI/pennylane-lightning/pull/725) + * 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) diff --git a/.github/workflows/build_and_cache_Kokkos_linux.yml b/.github/workflows/build_and_cache_Kokkos_linux.yml index 715f1a1a34..ae245ed43c 100644 --- a/.github/workflows/build_and_cache_Kokkos_linux.yml +++ b/.github/workflows/build_and_cache_Kokkos_linux.yml @@ -37,7 +37,7 @@ jobs: - name: Kokkos version id: kokkos_version - run: echo "kokkos_version=[\"4.2.00\"]" >> $GITHUB_OUTPUT + run: echo "kokkos_version=[\"4.3.01\"]" >> $GITHUB_OUTPUT outputs: exec_model: ${{ steps.exec_model.outputs.exec_model }} diff --git a/.github/workflows/set_wheel_build_matrix.yml b/.github/workflows/set_wheel_build_matrix.yml index d61af80f84..0f3c73fe17 100644 --- a/.github/workflows/set_wheel_build_matrix.yml +++ b/.github/workflows/set_wheel_build_matrix.yml @@ -52,7 +52,7 @@ jobs: - name: Kokkos version id: kokkos_version - run: echo "kokkos_version=[\"4.2.00\"]" >> $GITHUB_OUTPUT + run: echo "kokkos_version=[\"4.3.01\"]" >> $GITHUB_OUTPUT outputs: python_version: ${{ steps.pyver.outputs.python_version }} diff --git a/.github/workflows/tests_lkcuda_cpp.yml b/.github/workflows/tests_lkcuda_cpp.yml index 77a25896d1..edb4d80e78 100644 --- a/.github/workflows/tests_lkcuda_cpp.yml +++ b/.github/workflows/tests_lkcuda_cpp.yml @@ -43,7 +43,7 @@ jobs: matrix: os: [ubuntu-22.04] exec_model: ["CUDA"] - kokkos_version: ["4.2.00"] + kokkos_version: ["4.3.01"] steps: - name: Validate GPU version and installed compiler @@ -109,7 +109,7 @@ jobs: os: [ubuntu-22.04] pl_backend: ["lightning_kokkos"] exec_model: ["CUDA"] - kokkos_version: ["4.2.00"] + kokkos_version: ["4.3.01"] name: C++ Tests (${{ matrix.pl_backend }}, kokkos-${{ matrix.kokkos_version }}, model-${{ matrix.exec_model }}) runs-on: diff --git a/.github/workflows/tests_lkcuda_python.yml b/.github/workflows/tests_lkcuda_python.yml index 264de1e51e..ab9de3350b 100644 --- a/.github/workflows/tests_lkcuda_python.yml +++ b/.github/workflows/tests_lkcuda_python.yml @@ -46,7 +46,7 @@ jobs: matrix: os: [ubuntu-22.04] exec_model: ["CUDA"] - kokkos_version: ["4.2.00"] + kokkos_version: ["4.3.01"] steps: - name: Validate GPU version and installed compiler @@ -110,7 +110,7 @@ jobs: os: [ubuntu-22.04] pl_backend: ["lightning_kokkos", "all"] exec_model: ["CUDA"] - kokkos_version: ["4.2.00"] + kokkos_version: ["4.3.01"] name: Python Tests (${{ matrix.pl_backend }}, kokkos-${{ matrix.kokkos_version }}, model-${{ matrix.exec_model }}) runs-on: diff --git a/.github/workflows/tests_windows_cpp.yml b/.github/workflows/tests_windows_cpp.yml index 2a212d21a3..eea4b25e0f 100644 --- a/.github/workflows/tests_windows_cpp.yml +++ b/.github/workflows/tests_windows_cpp.yml @@ -38,7 +38,7 @@ jobs: - name: Kokkos version id: kokkos_version - run: echo "kokkos_version=[\"4.2.00\"]" >> $GITHUB_OUTPUT + run: echo "kokkos_version=[\"4.3.01\"]" >> $GITHUB_OUTPUT outputs: exec_model: ${{ steps.exec_model.outputs.exec_model }} diff --git a/cmake/support_kokkos.cmake b/cmake/support_kokkos.cmake index a628343de8..57978cdfd0 100644 --- a/cmake/support_kokkos.cmake +++ b/cmake/support_kokkos.cmake @@ -5,7 +5,7 @@ # Include this file only once include_guard() -set(KOKKOS_VERSION 4.2.00) +set(KOKKOS_VERSION 4.3.01) # Macro to aid in finding Kokkos with 3 potential install options: # 1. Fully integrated Kokkos packages and CMake module files diff --git a/docker/Dockerfile b/docker/Dockerfile index ee07ce1667..cec4284bef 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -20,8 +20,8 @@ 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.2.00 -ARG LIGHTNING_VERSION=v0.34.0 +ARG KOKKOS_VERSION=4.3.01 +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 \ && apt-get install --no-install-recommends -y \ diff --git a/pennylane_lightning/core/src/gates/Gates.hpp b/pennylane_lightning/core/src/gates/Gates.hpp index 32728deca9..b260c7c8de 100644 --- a/pennylane_lightning/core/src/gates/Gates.hpp +++ b/pennylane_lightning/core/src/gates/Gates.hpp @@ -482,7 +482,7 @@ row-major format. */ template