Registry / ai-ml / nvidia-cuda-nvrtc

nvidia-cuda-nvrtc

JSON →
library13.2.51pypypiunverified

The `nvidia-cuda-nvrtc` package provides the NVRTC (NVIDIA CUDA Runtime Compilation) native shared libraries. These libraries allow applications to compile CUDA C++ source code into PTX or cubin at runtime. It is a dependency for other Python libraries (e.g., PyTorch, JAX, TensorFlow, Numba) and C++/CUDA applications that need NVRTC functionality, ensuring that a compatible version of the NVRTC library is available. As of version 13.2.51, it aligns with CUDA Toolkit 13.2 and is actively maintained as part of NVIDIA's CUDA Python ecosystem, with releases typically coinciding with CUDA Toolkit updates.

pip install nvidia-cuda-nvrtc
INSTALL
IMPORT
SIG · NVIDIA-CUDA-NVRTC
N
nvidia-cuda-nvrtc
ai-mlpythonv13.2.51
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

This package does not expose a direct Python API for NVRTC functions. Its primary purpose is to install the necessary native shared libraries (`libnvrtc.so` or `nvrtc64_*.dll`) that other Python libraries (like PyTorch, JAX, or Numba) or C/C++ applications can load and link against. The code below merely confirms the package is installed and provides a conceptual usage note.

print("The nvidia-cuda-nvrtc package has been installed.") print("It provides native shared libraries for runtime CUDA compilation.") print("Other libraries (e.g., PyTorch, JAX) will automatically use these libraries if compatible.") # No direct Python API calls are available from this package itself.
Debug
Known issues
gotchaNo direct Python API is exposed by this package. Unlike typical Python libraries, `nvidia-cuda-nvrtc` does not provide Python symbols or classes for direct interaction with NVRTC functions. Its sole purpose is to provide the underlying native shared libraries (`libnvrtc.so` on Linux, `nvrtc64_*.dll` on Windows) which other Python frameworks (like PyTorch, JAX, or Numba) or C/C++ applications will then load and use.
fix
Do not attempt to import or call functions directly from `nvidia-cuda-nvrtc`. Instead, ensure it's installed as a dependency for frameworks that utilize NVRTC (e.g., PyTorch, JAX, Numba, or `cuda-python` for `ctypes` bindings).
affects: All versions
gotchaRequires a compatible NVIDIA GPU driver and CUDA Toolkit. While `nvidia-cuda-nvrtc` provides the NVRTC library, it does not install the full CUDA Toolkit or a GPU driver. For actual GPU computation or full CUDA functionality, your system must have a compatible NVIDIA GPU, an installed NVIDIA driver, and potentially a full CUDA Toolkit if you are compiling custom CUDA code or using other CUDA features.
fix
Verify your system meets the hardware and software requirements for CUDA. Install the latest stable NVIDIA GPU driver and, if necessary, the corresponding CUDA Toolkit for your operating system.
affects: All versions
gotchaVersion alignment with CUDA Toolkit is critical. The version of `nvidia-cuda-nvrtc` (e.g., 13.2.x) directly corresponds to a specific CUDA Toolkit version (e.g., CUDA 13.2). Mismatches between the `nvidia-cuda-*` packages, system CUDA installations, or the CUDA versions expected by dependent libraries can lead to runtime errors, linker issues, or unexpected behavior.
fix
Ensure all `nvidia-cuda-*` packages (e.g., `nvidia-cuda-runtime`, `nvidia-cuda-cupti`, etc.) are aligned to the same major and minor CUDA version. If a specific framework requires a particular CUDA version, install the corresponding `nvidia-cuda-*` packages.
affects: All versions
gotchaImplicit usage by dependent frameworks. Unlike many Python packages where you explicitly `import` and call functions, `nvidia-cuda-nvrtc` is typically consumed implicitly by higher-level machine learning frameworks or GPU computing libraries. You might not see direct references to it in your code, but its absence or incompatibility can cause failures in these frameworks.
fix
When troubleshooting CUDA-related issues in frameworks like PyTorch or JAX, always check the installed `nvidia-cuda-*` packages and their versions as they are foundational dependencies.
affects: All versions
Errors
Common errors & fixes
nvrtc: error: failed to open libnvrtc-builtins.so.XX.X (Linux) or nvrtc: error: failed to open nvrtc-builtins64_XX.dll (Windows)
The NVRTC runtime compilation library, specifically its built-ins component, cannot be found by the application, often due to incorrect `LD_LIBRARY_PATH` (Linux) or `PATH` (Windows) environment variables, or an incomplete/mismatched CUDA Toolkit installation.
fix
Ensure your `LD_LIBRARY_PATH` (Linux) or `PATH` (Windows) environment variable includes the directory where `libnvrtc-builtins.so` or `nvrtc-builtins64.dll` is located (e.g., `<CUDA_PATH>/lib64` or `<CUDA_PATH>/bin`), and that the installed `nvidia-cuda-nvrtc` package version matches your CUDA Toolkit version. For Python environments on Windows, explicitly installing `nvidia-cuda-nvrtc-cuXX` and `nvidia-cuda-runtime-cuXX` with matching major.minor versions via pip can help.
RuntimeError: Could not find libnvrtc.so. Please make sure CUDA is installed.
The Python application (e.g., PyTorch, JAX, CuPy) or an underlying CUDA component cannot locate the primary NVRTC shared library (`libnvrtc.so` on Linux, `nvrtc64_XX_0.dll` on Windows), typically due to missing or incorrectly configured environment variables or a partial CUDA installation.
fix
Verify that `libnvrtc.so` or `nvrtc64_XX_0.dll` exists within your CUDA Toolkit installation (e.g., `<CUDA_PATH>/lib64` or `<CUDA_PATH>/bin`) and ensure this path is included in `LD_LIBRARY_PATH` (Linux) or `PATH` (Windows). For Python environments, ensure `nvidia-cuda-nvrtc` and other `nvidia-cuda-runtime` packages are correctly installed and compatible with your CUDA version.
NVRTC_ERROR_COMPILATION (or NVRTCError: NVRTC_ERROR_COMPILATION)
NVRTC encountered an error during the runtime compilation of a CUDA C++ kernel, meaning the provided source code contains syntax errors, unsupported features for the target architecture, or other issues preventing successful PTX generation.
fix
Inspect the NVRTC compilation log (often dumped to stderr or available via `nvrtcGetProgramLog`) for specific error messages, which will point to issues in the CUDA C++ source code being compiled. Correct the identified errors in the kernel code.
nvrtc: error: invalid value for --gpu-architecture (-arch)
An unsupported or incorrect GPU architecture flag (e.g., `--gpu-architecture=compute_XX` or `-arch=sm_YY`) was passed to NVRTC during compilation, often when the specified architecture does not match the available GPU or the NVRTC version's supported targets.
fix
Ensure the `--gpu-architecture` or `-arch` flag matches the compute capability of your target GPU (e.g., `sm_86` for an RTX 3080) and is supported by your CUDA Toolkit and NVRTC version. You can find your GPU's compute capability using `nvidia-smi` or `deviceQuery` from the CUDA samples.
Upgrade
Version history
13.2.51latest on PyPI · released Mar 9, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Resources
nvidia-cuda-nvrtc — pip install nvidia-cuda-nvrtc · libregistry