Skip to content

Commit 500a0c4

Browse files
mlxdgithub-actions[bot]AmintorDusko
authored andcommitted
Add L-GPU and L-Kokkos as package extras (#515)
* Add L-GPU and L-Kokkos as package extras * Auto update version * Update changelog * Temp enable the x86 wheel cache * Return wheel storage functionality to normal * Update readme * Auto update version * Trigger CI * Update README.rst Co-authored-by: Amintor Dusko <[email protected]> --------- Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com> Co-authored-by: Amintor Dusko <[email protected]>
1 parent ade064d commit 500a0c4

File tree

3 files changed

+30
-2
lines changed

3 files changed

+30
-2
lines changed

.github/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@
3737

3838
### Improvements
3939

40+
* Add support for `pip install pennylane-lightning[kokkos]` for the OpenMP backend.
41+
[(#515)](https://github.com/PennyLaneAI/pennylane-lightning/pull/515)
42+
4043
* Update setup.py to allow for multi-package co-existence. The PennyLane_Lightning package now is the responsible for the core functionality, and will be depended upon by all other extensions.
4144
[(#504)] (https://github.com/PennyLaneAI/pennylane-lightning/pull/504)
4245

@@ -62,6 +65,9 @@
6265

6366
### Bug fixes
6467

68+
* Re-add support for `pip install pennylane-lightning[gpu]`.
69+
[(#515)](https://github.com/PennyLaneAI/pennylane-lightning/pull/515)
70+
6571
* Switch most L-Qubit default kernels to `LM`. Add `LM::multiQubitOp` tests, failing when targeting out-of-order wires clustered close to `num_qubits-1`. Fix the `LM::multiQubitOp` kernel implementation by introducing a generic `revWireParity` routine and replacing the `bitswap`-based implementation. Mimic the changes fixing the corresponding `multiQubitOp` and `expval` functors in L-Kokkos.
6672
[(#511)](https://github.com/PennyLaneAI/pennylane-lightning/pull/511)
6773

README.rst

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,27 @@ Note that OpenMP and BLAS are disabled in this setting.
189189
Lightning Kokkos installation
190190
=============================
191191

192+
For linux systems, `lightning.kokkos` and be readily installed with an OpenMP backend by providing the optional ``[kokkos]`` tag:
193+
194+
.. code-block:: console
195+
196+
$ pip install pennylane-lightning[kokkos]
197+
198+
This can be explicitly installed through PyPI as:
199+
200+
.. code-block:: console
201+
202+
$ pip install pennylane-lightning-kokkos
203+
204+
205+
Building from source
206+
--------------------
207+
208+
As Kokkos enables support for many different HPC-targetted hardware platforms, `lightning.kokkos` can be built to support any of these platforms when building from source.
209+
192210
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>`_.
193211
Next, append the install location to ``CMAKE_PREFIX_PATH``.
194-
If an installation is not found, our builder will install it from scratch nevertheless.
212+
If an installation is not found, our builder will clone and install it during the build process.
195213

196214
The simplest way to install PennyLane-Lightning-Kokkos (OpenMP backend) is using ``pip``.
197215

@@ -220,7 +238,7 @@ To build the plugin directly with CMake:
220238
cmake -B build -DKokkos_ENABLE_OPENMP=ON -DPLKOKKOS_BUILD_TESTS=ON -DPL_BACKEND=lightning_kokkos -G Ninja
221239
cmake --build build
222240
223-
Supported backend options are "SERIAL", "OPENMP", "THREADS", "HIP" and "CUDA" and the corresponding build options are ``-DKokkos_ENABLE_XXX=ON``, where ``XXX`` needs be replaced by the backend name, for instance ``OPENMP``.
241+
The supported backend options are "SERIAL", "OPENMP", "THREADS", "HIP" and "CUDA" and the corresponding build options are ``-DKokkos_ENABLE_XXX=ON``, where ``XXX`` needs be replaced by the backend name, for instance ``OPENMP``.
224242
One can activate simultaneously one serial, one parallel CPU host (e.g. "OPENMP", "THREADS") and one parallel GPU device backend (e.g. "HIP", "CUDA"), but not two of any category at the same time.
225243
For "HIP" and "CUDA", the appropriate software stacks are required to enable compilation and subsequent use.
226244
Similarly, the CMake option ``-DKokkos_ARCH_{...}=ON`` must also be specified to target a given architecture.

setup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,10 @@ def build_extension(self, ext: CMakeExtension):
207207
else [CMakeExtension(f"{backend}_ops")],
208208
"cmdclass": {"build_ext": CMakeBuild},
209209
"ext_package": "pennylane_lightning",
210+
"extras_require": {
211+
"gpu": ["pennylane-lightning-gpu"],
212+
"kokkos": ["pennylane-lightning-kokkos"],
213+
},
210214
}
211215

212216
if backend == "lightning_qubit":

0 commit comments

Comments
 (0)