Skip to content
Merged
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
Next Next commit
Add CUDA 12 docs.
  • Loading branch information
bdice committed Mar 10, 2024
commit 9e0be3b42ec1a116c99ece2c5b3160b2418b92c4
4 changes: 2 additions & 2 deletions buildscripts/condarecipe.local/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ requirements:
# Exclude 0.3.20 too
# https://github.com/numba/numba/issues/8096
- libopenblas >=0.3.18, !=0.3.20 # [arm64]
# CUDA 10.2 or later is required for CUDA support
- cudatoolkit >=10.2
# CUDA 11.0 or later is required for CUDA support
- cudatoolkit >=11.0
Comment thread
gmarkall marked this conversation as resolved.
Resolved
# scipy 1.0 or later
- scipy >=1.0
# CUDA Python 11.6 or later
Expand Down
19 changes: 13 additions & 6 deletions docs/source/cuda/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,15 @@ Presently 11.2 is the minimum required toolkit version. An NVIDIA driver
sufficient for the toolkit version is also required (see also
:ref:`minor-version-compatibility`).

If you are using Conda, you can install the CUDA toolkit with::
Conda users can install the CUDA Toolkit into a conda environment.

$ conda install cudatoolkit
For CUDA 12, ``cuda-nvcc`` and ``cuda-nvrtc`` are required::

$ conda install -c conda-forge cuda-nvcc cuda-nvrtc "cuda-version>=12.0"

For CUDA 11, ``cudatoolkit`` is required::

$ conda install -c conda-forge cudatoolkit "cuda-version=11.*"
Comment thread
gmarkall marked this conversation as resolved.
Resolved

If you are not using Conda or if you want to use a different version of CUDA
toolkit, the following describes how Numba searches for a CUDA toolkit
Expand All @@ -82,7 +88,7 @@ release.

You can install the NVIDIA bindings with::

$ conda install nvidia::cuda-python
$ conda install -c conda-forge cuda-python

if you are using Conda, or::

Expand All @@ -100,11 +106,12 @@ Setting CUDA Installation Path

Numba searches for a CUDA toolkit installation in the following order:

1. Conda installed `cudatoolkit` package.
1. Conda installed CUDA Toolkit packages (``cuda-toolkit`` for CUDA 12, or
``cudatoolkit`` for CUDA 11)
Comment thread
gmarkall marked this conversation as resolved.
Resolved
2. Environment variable ``CUDA_HOME``, which points to the directory of the
installed CUDA toolkit (i.e. ``/home/user/cuda-10``)
installed CUDA toolkit (i.e. ``/home/user/cuda-12``)
3. System-wide installation at exactly ``/usr/local/cuda`` on Linux platforms.
Versioned installation paths (i.e. ``/usr/local/cuda-10.0``) are intentionally
Versioned installation paths (i.e. ``/usr/local/cuda-12.0``) are intentionally
ignored. Users can use ``CUDA_HOME`` to select specific versions.

In addition to the CUDA toolkit libraries, which can be installed by conda into
Expand Down
11 changes: 8 additions & 3 deletions docs/source/user/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,17 @@ Note that Numba, like Anaconda, only supports PPC in 64-bit little-endian mode.
To enable CUDA GPU support for Numba, install the latest `graphics drivers from
NVIDIA <https://www.nvidia.com/Download/index.aspx>`_ for your platform.
(Note that the open source Nouveau drivers shipped by default with many Linux
distributions do not support CUDA.) Then install the ``cudatoolkit`` package::
distributions do not support CUDA.) Then install the CUDA Toolkit package.

$ conda install cudatoolkit
For CUDA 12, ``cuda-nvcc`` and ``cuda-nvrtc`` are required::

You do not need to install the CUDA SDK from NVIDIA.
$ conda install -c conda-forge cuda-nvcc cuda-nvrtc "cuda-version>=12.0"

For CUDA 11, ``cudatoolkit`` is required::

$ conda install -c conda-forge cudatoolkit "cuda-version=11.*"
Comment thread
gmarkall marked this conversation as resolved.
Resolved

You do not need to install the CUDA SDK from NVIDIA.

Installing using pip on x86/x86_64 Platforms
--------------------------------------------
Expand Down
7 changes: 4 additions & 3 deletions numba/cuda/cudadrv/libs.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
"""Cudatoolkit libraries lookup utilities.
"""CUDA Toolkit libraries lookup utilities.

Cudatoolkit libraries can be available via either:
CUDA Toolkit libraries can be available via either:

- the `cudatoolkit` conda package,
- the `cuda-nvcc` and `cuda-nvrtc` conda packages for CUDA 12,
- the `cudatoolkit` conda package for CUDA 11,
- a user supplied location from CUDA_HOME,
- a system wide location,
- package-specific locations (e.g. the Debian NVIDIA packages),
Expand Down
10 changes: 7 additions & 3 deletions numba/cuda/cudadrv/nvvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,10 +416,14 @@ def get_arch_option(major, minor):


MISSING_LIBDEVICE_FILE_MSG = '''Missing libdevice file.
Please ensure you have package cudatoolkit >= 11.0
Install package by:
Please ensure you have a CUDA Toolkit 11.0 or higher.
Comment thread
gmarkall marked this conversation as resolved.
Resolved
For CUDA 12, ``cuda-nvcc`` and ``cuda-nvrtc`` are required:

conda install cudatoolkit
$ conda install -c conda-forge cuda-nvcc cuda-nvrtc "cuda-version>=12.0"

For CUDA 11, ``cudatoolkit`` is required:

$ conda install -c conda-forge cudatoolkit "cuda-version=11.*"
Comment thread
gmarkall marked this conversation as resolved.
Resolved
'''


Expand Down