{"id":1587,"library":"nvidia-cuda-nvrtc","title":"NVIDIA CUDA NVRTC","description":"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.","status":"active","version":"13.2.51","language":"en","source_language":"en","source_url":"https://github.com/NVIDIA/cuda-python","tags":["cuda","nvidia","gpu","runtime","compilation","nvrtc"],"install":[{"cmd":"pip install nvidia-cuda-nvrtc","lang":"bash","label":"Install the package"}],"dependencies":[],"imports":[],"quickstart":{"code":"print(\"The nvidia-cuda-nvrtc package has been installed.\")\nprint(\"It provides native shared libraries for runtime CUDA compilation.\")\nprint(\"Other libraries (e.g., PyTorch, JAX) will automatically use these libraries if compatible.\")\n# No direct Python API calls are available from this package itself.","lang":"python","description":"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."},"warnings":[{"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).","message":"No 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.","severity":"gotcha","affected_versions":"All versions"},{"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.","message":"Requires 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.","severity":"gotcha","affected_versions":"All versions"},{"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.","message":"Version 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.","severity":"gotcha","affected_versions":"All versions"},{"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.","message":"Implicit 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.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-09T00:00:00.000Z","next_check":"2026-07-08T00:00:00.000Z"}