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

Add build and test support for CUDA 12 #606

Merged
merged 35 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
110b4f2
Add build and test support for CUDA 12
mlxd Feb 2, 2024
6681f48
Auto update version
github-actions[bot] Feb 2, 2024
ddc0a65
Fix name
mlxd Feb 2, 2024
aa5d5dc
Merge branch 'update/lgpu_cuda12' of github.com:PennyLaneAI/pennylane…
mlxd Feb 2, 2024
0c4471a
Avoid overstepping with CUDA 11 on 12
mlxd Feb 2, 2024
eb10a24
Fix wheel output naming
mlxd Feb 2, 2024
b82b4d7
Remove unneeded strings
mlxd Feb 2, 2024
8570193
Add missing 0 to CUDA 11 install
mlxd Feb 2, 2024
115a844
Trigger CI
mlxd Feb 2, 2024
3f8c8f7
Update to allow CUDA 11 wheels to build also
mlxd Feb 5, 2024
a2aaac3
Update fromJSON usage
mlxd Feb 5, 2024
f2d4115
Update int to str in json map
mlxd Feb 5, 2024
198c396
Aim to keep cuda 11.5 wheels for now
mlxd Feb 5, 2024
6566608
Remove CUDA 11
mlxd Feb 5, 2024
8c0e238
Migrate windows tests to clangcl to avoid failures
mlxd Feb 6, 2024
44fcb00
Ensure VS generator used
mlxd Feb 6, 2024
47e7387
Update for auditwheel 6.0 changes
mlxd Feb 6, 2024
e98f183
Ensure devtoolset values are used in CUDA 12 build
mlxd Feb 7, 2024
baedf47
Remove unneeded deref
mlxd Feb 7, 2024
69ddde1
Retry installing cuda 12.0
mlxd Feb 7, 2024
c285319
Fix auditwheel arch check
mlxd Feb 7, 2024
9a21ea9
Fix auditwheel arch check again
mlxd Feb 7, 2024
38450e9
Revert windows tests
mlxd Feb 7, 2024
a52e40f
Lower overhead of Windows CI tests (#610)
mlxd Feb 7, 2024
9cc12d4
Update changelog
mlxd Feb 7, 2024
a9feabf
Remove trainability from stateprep in test
mlxd Feb 9, 2024
49f3d6e
Update dev reqs to use cu12
mlxd Feb 9, 2024
0f7caa2
Fix formatting
mlxd Feb 9, 2024
655d966
Update the MPI modules in CI
mlxd Feb 9, 2024
7f0bf00
Add ls to module dirs
mlxd Feb 9, 2024
a7e7eae
Remove additional cu11 deps
mlxd Feb 9, 2024
29427b4
Use mpirun from PATH
mlxd Feb 9, 2024
12e4f56
Update to cu12 in missing locations
mlxd Feb 9, 2024
4812a93
Remove opt path specifics
mlxd Feb 9, 2024
c0c5a25
Ensure cuda version env vars are inlcuded on Python tests for MPI
mlxd Feb 9, 2024
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
Remove additional cu11 deps
  • Loading branch information
mlxd committed Feb 9, 2024
commit a7e7eaef4fa22615e78cfea8bb448dc25a480c63
2 changes: 1 addition & 1 deletion .github/workflows/tests_linux_x86_mpi_gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
- name: Install required packages
run: |
python -m pip install -r requirements-dev.txt
python -m pip install cmake custatevec-cu11
python -m pip install cmake custatevec-cu12
sudo apt-get -y -q install liblapack-dev

- name: Validate GPU version and installed compiler and modules
Expand Down
8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ On MacOS, we recommend using the latest version of ``clang++`` and ``libomp``:

$ brew install llvm libomp

The Lightning-GPU backend has several dependencies (e.g. ``CUDA``, ``custatevec-cu11``, etc.), and hence we recommend referring to Lightning-GPU installation section.
The Lightning-GPU backend has several dependencies (e.g. ``CUDA``, ``custatevec-cu12``, etc.), and hence we recommend referring to Lightning-GPU installation section.
Similarly, for Lightning-Kokkos it is recommended to configure and install Kokkos independently as prescribed in the Lightning-Kokkos installation section.

Development installation
Expand Down Expand Up @@ -227,7 +227,7 @@ Lightning-GPU can be installed using ``pip``:

pip install pennylane-lightning[gpu]

Lightning-GPU requires the `cuQuantum SDK <https://developer.nvidia.com/cuquantum-sdk>`_ (only the `cuStateVec <https://docs.nvidia.com/cuda/cuquantum/latest/custatevec/index.html>`_ library is required).
Lightning-GPU requires CUDA 12 and the `cuQuantum SDK <https://developer.nvidia.com/cuquantum-sdk>`_ (only the `cuStateVec <https://docs.nvidia.com/cuda/cuquantum/latest/custatevec/index.html>`_ library is required).
The SDK may be installed within the Python environment ``site-packages`` directory using ``pip`` or ``conda`` or the SDK library path appended to the ``LD_LIBRARY_PATH`` environment variable.
Please see the `cuQuantum SDK`_ install guide for more information.

Expand All @@ -247,7 +247,7 @@ Then the `cuStateVec`_ library can be installed and set a ``CUQUANTUM_SDK`` envi

.. code-block:: console

python -m pip install wheel custatevec-cu11
python -m pip install wheel custatevec-cu12
export CUQUANTUM_SDK=$(python -c "import site; print( f'{site.getsitepackages()[0]}/cuquantum/lib')")

The Lightning-GPU can then be installed with ``pip``:
Expand All @@ -261,7 +261,7 @@ To simplify the build, we recommend using the containerized build process descri
Install Lightning-GPU with MPI
==============================

Building Lightning-GPU with MPI also requires the ``NVIDIA cuQuantum SDK`` (currently supported version: `custatevec-cu11 <https://pypi.org/project/cuquantum-cu11/>`_), ``mpi4py`` and ``CUDA-aware MPI`` (Message Passing Interface).
Building Lightning-GPU with MPI also requires the ``NVIDIA cuQuantum SDK`` (currently supported version: `custatevec-cu12 <https://pypi.org/project/cuquantum-cu12/>`_), ``mpi4py`` and ``CUDA-aware MPI`` (Message Passing Interface).
``CUDA-aware MPI`` allows data exchange between GPU memory spaces of different nodes without the need for CPU-mediated transfers.
Both the ``MPICH`` and ``OpenMPI`` libraries are supported, provided they are compiled with CUDA support.
The path to ``libmpi.so`` should be found in ``LD_LIBRARY_PATH``.
Expand Down
2 changes: 1 addition & 1 deletion doc/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ sphinxcontrib-qthelp==1.0.3
sphinxcontrib-htmlhelp==2.0.1
sphinxcontrib-serializinghtml==1.1.5
pennylane-sphinx-theme
custatevec-cu11
custatevec-cu12
wheel
sphinxext-opengraph
matplotlib
Loading