| Title: | CUDA Toolkit Libraries for 'pjrt' |
|---|---|
| Description: | Provides the CUDA 13.3 native libraries required by the CUDA PJRT plugin used by the 'pjrt' package (CUDA runtime, cuBLAS, cuDNN, CUPTI, NVRTC, cuFFT, cuSOLVER, cuSPARSE, NvJitLink, NCCL, and NVCC). The package itself is lightweight; the CUDA components are downloaded as NVIDIA's official redistributable binaries from PyPI into a user cache directory the first time the package is loaded. |
| Authors: | Sebastian Fischer [cre, aut] (ORCID: <https://orcid.org/0000-0002-9609-3197>), Daniel Falbel [aut] (ORCID: <https://orcid.org/0009-0006-0143-2392>) |
| Maintainer: | Sebastian Fischer <seb.fischer@tutamail.com> |
| License: | MIT + file LICENSE |
| Version: | 0.2.0 |
| Built: | 2026-10-10 15:14:30 UTC |
| Source: | https://github.com/r-xla/pjrt.cuda |
Provides the CUDA 13.3 native libraries required by the CUDA PJRT plugin used by the 'pjrt' package (CUDA runtime, cuBLAS, cuDNN, CUPTI, NVRTC, cuFFT, cuSOLVER, cuSPARSE, NvJitLink, NCCL, and NVCC). The package itself is lightweight; the CUDA components are downloaded as NVIDIA's official redistributable binaries from PyPI into a user cache directory the first time the package is loaded.
The package itself is lightweight. The CUDA components (several GB) are
downloaded from PyPI into cuda_home() the first time the package is
loaded, or when install_cuda() is called. Whether loading the package may
download them is controlled by the environment variable PJRT_INSTALL,
which is shared with the pjrt package:
PJRT_INSTALL=1: download without asking (e.g. CI, scripts, Docker builds).
PJRT_INSTALL=0: never download.
unset: ask for confirmation in an interactive session, do nothing in a non-interactive one.
PJRT_INSTALL: Whether loading the package may download the CUDA
components, see above.
PJRT_CUDA_HOME: Directory in which the CUDA components are installed.
Defaults to tools::R_user_dir("pjrt.cuda", "cache").
PJRT_CUDA_COMPONENTS: Comma-separated list of components to install
(default: all components), e.g. "runtime,cublas,cudnn". A component's
pinned version can be overridden with @, e.g. "cudnn@9.10.0.56".
Note that the pjrt CUDA backend requires all components to be present.
The pjrt.cuda package itself is MIT-licensed. It does not bundle NVIDIA
software; instead it downloads NVIDIA's official redistributable binaries
from PyPI. Their use is governed by the
NVIDIA CUDA Toolkit EULA, with the
exception of cuDNN, which is covered by the
NVIDIA cuDNN SLA,
and NCCL, which is covered by its
own license.
By downloading them you accept those terms.
Maintainer: Sebastian Fischer seb.fischer@tutamail.com (ORCID)
Authors:
Sebastian Fischer seb.fischer@tutamail.com (ORCID)
Daniel Falbel daniel@posit.co (ORCID)
Useful links:
Returns the bin directory of a single CUDA component (e.g. ptxas for
"nvcc").
bin_path(component)bin_path(component)
component |
( |
(character(1))
Path to the component's bin directory.
Returns the directory into which the CUDA components are downloaded.
This is tools::R_user_dir("pjrt.cuda", "cache") unless the environment
variable PJRT_CUDA_HOME is set.
cuda_home()cuda_home()
(character(1))
Path to the installation directory (which may not exist yet).
Checks whether the CUDA components selected by PJRT_CUDA_COMPONENTS
(default: all) are installed in cuda_home() with the versions pinned by
this version of the package.
cuda_installed()cuda_installed()
(logical(1))
Returns the installation root of a single CUDA component.
cuda_path(component)cuda_path(component)
component |
( |
(character(1))
Path to the installed component files.
Returns the include directory of a single CUDA component.
include_path(component)include_path(component)
component |
( |
(character(1))
Path to the component's include directory.
Downloads the CUDA components from PyPI and unpacks them into
cuda_home(). This runs automatically when the package is loaded (see
pjrt.cuda-package for how to control that), so calling it manually is
only needed to force a reinstallation or to install in a session where
automatic downloads are disabled.
Which components are installed is controlled by the environment variable
PJRT_CUDA_COMPONENTS, see pjrt.cuda-package.
install_cuda(reinstall = FALSE)install_cuda(reinstall = FALSE)
reinstall |
( |
(character(1))
The installation directory, invisibly.
All CUDA component shared libraries are installed into a single directory, which this function returns.
lib_path()lib_path()
(character(1))
Path to the lib directory.