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 the missing ninja in AARCH64 Linux wheel recipe #1007

Merged
merged 18 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
6 changes: 6 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@

### Improvements

* Update Kokkos version support to 4.5.
[(#1007)](https://github.com/PennyLaneAI/pennylane-lightning/pull/1007)

* Update Kokkos version support to 4.4.1 and enable Lightning-Kokkos[CUDA] C++ tests on CI.
[(#1000)](https://github.com/PennyLaneAI/pennylane-lightning/pull/1000)

Expand All @@ -45,6 +48,9 @@

### Bug fixes

* Fix the missing `ninja` in Linux AARCH64 wheels recipe.
[(#1007)](https://github.com/PennyLaneAI/pennylane-lightning/pull/1007)

* Fix issue with `lightning.gpu` Rot operation with adjoint.
[(#1004)](https://github.com/PennyLaneAI/pennylane-lightning/pull/1004)

Expand Down
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.4.01
default: 4.5.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.4.01\"]" >> $GITHUB_OUTPUT
run: echo "kokkos_version=[\"4.5.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 @@ -49,7 +49,7 @@ jobs:
uses: ./.github/workflows/build_and_cache_Kokkos_linux.yml
with:
os: ubuntu-22.04
kokkos_version: "4.4.01"
kokkos_version: "4.5.00"

build_lightning_kokkos_wheels:
needs: [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 @@ -49,7 +49,7 @@ jobs:
matrix:
os: [ubuntu-22.04]
exec_model: ["CUDA"]
kokkos_version: ["4.4.01"]
kokkos_version: ["4.5.00"]

steps:
- name: Validate GPU version and installed compiler
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
os: [ubuntu-22.04]
pl_backend: ["lightning_kokkos"]
exec_model: ["CUDA"]
kokkos_version: ["4.4.01"]
kokkos_version: ["4.5.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 @@ -54,7 +54,7 @@ jobs:
matrix:
os: [ubuntu-22.04]
exec_model: ["CUDA"]
kokkos_version: ["4.4.01"]
kokkos_version: ["4.5.00"]

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

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 @@ -44,7 +44,7 @@ jobs:

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

outputs:
exec_model: ${{ steps.exec_model.outputs.exec_model }}
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/wheel_linux_aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,15 @@ jobs:
-i ${{ matrix.container_img }} \
bash -c "git config --global --add safe.directory /io && \
cd /io && \
python3.10 -m pip install ninja && \
ln -s /opt/python/cp310-cp10/bin/ninja /usr/bin/ninja && \
yum install -y ninja-build && \
echo $(which ninja) && \
echo $(ninja --version) && \
cmake -BBuild . -DCMAKE_INSTALL_PREFIX=/install \
-DKokkos_ENABLE_COMPLEX_ALIGN=OFF \
-DKokkos_ENABLE_SERIAL=ON \
-DKokkos_ENABLE_${{ matrix.exec_model }}=ON \
-DKokkos_ENABLE_DEPRECATION_WARNINGS=OFF \
-DCMAKE_CXX_COMPILER=g++ \
-DCMAKE_CXX_STANDARD=20 \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-G Ninja && \
Expand Down
24 changes: 12 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ You can also pass ``cmake`` options with ``CMAKE_ARGS`` as follows:
.. code-block:: bash

CMAKE_ARGS="-DENABLE_OPENMP=OFF -DENABLE_BLAS=OFF" pip install -e . --config-settings editable_mode=compat -vv


Supported options are ``-DENABLE_WARNINGS``, ``-DENABLE_NATIVE`` (for ``-march=native``) ``-DENABLE_BLAS``, ``-DENABLE_OPENMP``, and ``-DENABLE_CLANG_TIDY``.

Expand All @@ -162,7 +162,7 @@ Then a common command will work.
.. code-block:: bash

pip install -r requirements.txt
pip install -e .
pip install -e .

Note that OpenMP and BLAS are disabled on this platform.

Expand All @@ -173,24 +173,24 @@ Testing
To test that a plugin is working correctly, one can check both Python and C++ unit tests for each device.

Python Test
^^^^^^^^^^^
^^^^^^^^^^^

Test the Python code with:

.. code-block:: bash

make test-python device=${PL.DEVICE}

where ``${PL.DEVICE}`` differ from ``${PL_BACKEND}`` by replacing the underscore by a dot. And can be
where ``${PL.DEVICE}`` differ from ``${PL_BACKEND}`` by replacing the underscore by a dot. And can be

- ``lightning.qubit`` (default)
- ``lightning.gpu``
- ``lightning.qubit`` (default)
- ``lightning.gpu``
- ``lightning.kokkos``
- ``lightning.tensor``

C++ Test
^^^^^^^^

The C++ code can be tested with

.. code-block:: bash
Expand Down Expand Up @@ -317,12 +317,12 @@ Install Kokkos (Optional)
We suggest first installing Kokkos with the wanted configuration following the instructions found in the `Kokkos documentation <https://kokkos.github.io/kokkos-core-wiki/building.html>`_.
For example, the following will build Kokkos for NVIDIA A100 cards

Download the `Kokkos code <https://github.com/kokkos/kokkos/releases>`_. Lightning Kokkos was tested with Kokkos version <= 4.4.1
Download the `Kokkos code <https://github.com/kokkos/kokkos/releases>`_. Lightning Kokkos was tested with Kokkos version <= 4.5.0

.. code-block:: bash

# Replace x, y, and z by the correct version
wget https://github.com/kokkos/kokkos/archive/refs/tags/4.x.yz.tar.gz
wget https://github.com/kokkos/kokkos/archive/refs/tags/4.x.yz.tar.gz
tar -xvf 4.x.y.z.tar.gz
cd kokkos-4.x.y.z

Expand Down Expand Up @@ -365,9 +365,9 @@ The simplest way to install Lightning-Kokkos (OpenMP backend) through ``pip``.
PL_BACKEND="lightning_kokkos" python scripts/configure_pyproject_toml.py
CMAKE_ARGS="-DKokkos_ENABLE_OPENMP=ON" python -m pip install -e . --config-settings editable_mode=compat -vv

The supported backend options are
The supported backend options are

.. list-table::
.. list-table::
:align: center
:width: 100 %
:widths: 20 20 20 20 20
Expand All @@ -377,7 +377,7 @@ The supported backend options are
- ``OPENMP``
- ``THREADS``
- ``HIP``
- ``CUDA``
- ``CUDA``

and the corresponding build options are ``-DKokkos_ENABLE_XXX=ON``, where ``XXX`` needs be replaced by the backend name, for instance ``OPENMP``.

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.4.01)
set(KOKKOS_VERSION 4.5.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 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.40.0-dev17"
__version__ = "0.40.0-dev18"
Loading