{"library":"nvidia-nvjitlink-cu12","title":"NVIDIA JIT LTO Library (CUDA 12)","description":"The `nvidia-nvjitlink-cu12` package is a metapackage that facilitates the installation of the NVIDIA JIT LTO (Just-In-Time Link Time Optimization) library, `nvJitLink`, as part of the CUDA Toolkit for CUDA 12.x environments. It ensures the presence of the native C-based `nvJitLink` library, which is used by other Python libraries like CuPy and Numba-CUDA for advanced GPU code compilation and linking at runtime. This package itself does not expose direct Python APIs for JIT linking. The current version is 12.9.86, and it follows the CUDA Toolkit's release cadence.","status":"active","version":"12.9.86","language":"en","source_language":"en","source_url":"https://pypi.org/project/nvidia-nvjitlink-cu12/","tags":["NVIDIA","CUDA","JIT","LTO","GPU","compiler","runtime","deep learning","machine learning"],"install":[{"cmd":"pip install nvidia-nvjitlink-cu12","lang":"bash","label":"Install latest version"},{"cmd":"pip install --extra-index-url https://pypi.nvidia.com nvidia-pyindex\npip install nvidia-nvjitlink-cu12","lang":"bash","label":"Install with NVIDIA PyPI index (recommended for full ecosystem)"}],"dependencies":[{"reason":"Provides the underlying nvJitLink native library; this package is primarily for Python environment integration. Requires a CUDA-capable GPU and NVIDIA driver.","package":"CUDA Toolkit (system-wide)","optional":false},{"reason":"Provides direct Python bindings to the nvJitLink library for advanced JIT linking operations.","package":"pynvjitlink-cu12","optional":true},{"reason":"Leverages nvJitLink automatically for GPU JIT compilation when available.","package":"numba-cuda (>=0.16)","optional":true},{"reason":"Can utilize nvJitLink for enhanced cuFFT LTO callbacks and other JIT functionalities.","package":"cupy (>=14.0)","optional":true}],"imports":[{"note":"nvidia-nvjitlink-cu12 is a metapackage for the native library, not a direct Python API library for JIT linking.","symbol":"None","correct":"This package primarily installs native libraries; direct Python imports for JIT linking functionality are not typically made from `nvidia-nvjitlink-cu12`. Higher-level libraries like `pynvjitlink-cu12`, `numba.cuda`, or `cupy` provide the Python interfaces that utilize the installed `nvJitLink` library."}],"quickstart":{"code":"import os\n\ntry:\n    import cupy as cp\n    print(f\"CuPy is installed. CUDA available: {cp.cuda.is_available()}\")\n    if cp.cuda.is_available():\n        print(f\"CuPy CUDA Device Count: {cp.cuda.runtime.getDeviceCount()}\")\nexcept ImportError:\n    print(\"CuPy not installed. Install with `pip install cupy-cuda12x` to verify CUDA environment.\")\n\ntry:\n    import numba.cuda\n    print(f\"Numba CUDA is installed. CUDA available: {numba.cuda.is_available()}\")\n    if numba.cuda.is_available():\n        print(f\"Numba CUDA Device Count: {numba.cuda.count_devices()}\")\nexcept ImportError:\n    print(\"Numba-CUDA not installed. Install with `pip install numba-cuda` to verify CUDA environment.\")\n\nprint(\"\\nThis output indicates whether higher-level Python libraries can detect and use the CUDA environment, which includes the nvJitLink library provided by nvidia-nvjitlink-cu12.\")","lang":"python","description":"Since `nvidia-nvjitlink-cu12` is a metapackage for native CUDA components, its functionality is indirectly exposed through other Python libraries that depend on the `nvJitLink` library. This quickstart demonstrates how to check for the availability of a CUDA-capable GPU and the CUDA runtime environment using `CuPy` and `Numba-CUDA`, which would implicitly rely on `nvJitLink` if their features that use it are invoked. This verifies that the underlying CUDA toolkit, which `nvidia-nvjitlink-cu12` helps install, is correctly set up."},"warnings":[{"fix":"Use `pynvjitlink-cu12` for direct Python bindings to `nvJitLink`, or rely on libraries like `numba-cuda` or `cupy` which integrate `nvJitLink` functionality.","message":"This package `nvidia-nvjitlink-cu12` is a *metapackage* for a native C library (`nvJitLink`) and part of the CUDA Toolkit. It does not provide direct Python APIs for JIT linking functionality. Python users typically interact with `nvJitLink` through higher-level libraries like `pynvjitlink-cu12`, `Numba-CUDA`, or `CuPy` that are built to utilize it.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure all inputs for JIT LTO (especially LTO-IR) are compiled with a CUDA Toolkit version compatible with the `nvJitLink` library being used. Compatibility is only guaranteed within a major CUDA release for LTO-IR. Update your CUDA Toolkit and associated `nvidia-nvjitlink-cu12` package to match if encountering linking errors.","message":"The `nvJitLink` library has compatibility constraints regarding linking objects across different CUDA major versions, especially for LTO-IR (Link Time Optimization Intermediate Representation) inputs. Linking across major versions (e.g., CUDA 11.x with 12.x) may not work for LTO-IR inputs, although it generally works for ELF and PTX inputs.","severity":"breaking","affected_versions":"All versions (relative to CUDA Toolkit versions)"},{"fix":"Ensure a compatible NVIDIA GPU driver is installed. For full CUDA development, consider installing the complete NVIDIA CUDA Toolkit alongside these Python packages, or use `cupy-cudaXX[ctk]` for a more complete pip-based CUDA runtime environment with CuPy.","message":"Installation of `nvidia-nvjitlink-cu12` from PyPI typically requires a pre-existing CUDA driver, even if it aims to install CUDA runtime components. For full development capabilities, a system-wide CUDA Toolkit installation is often still necessary as these pip wheels primarily provide runtime components and may not include developer tools (like `nvcc`).","severity":"gotcha","affected_versions":"All versions"},{"fix":"Migrate from deprecated `cuLink*` APIs to the `nvJitLink` library for JIT LTO functionality.","message":"The `cuLink*` APIs in the CUDA Driver, which provided similar functionality to `nvJitLink`, have been deprecated for use with LTO-IR. `nvJitLink` is the recommended path for JIT LTO.","severity":"deprecated","affected_versions":"CUDA Toolkit versions prior to 12.0"}],"env_vars":null,"last_verified":"2026-04-05T00:00:00.000Z","next_check":"2026-07-04T00:00:00.000Z"}