# CUDA Minor Version Compatibility

CUDA Built-in Target deprecation notice

The CUDA target built-in to Numba is deprecated, with further development moved to the NVIDIA numba-cuda package. Please see Built-in CUDA target deprecation and maintenance status.

CUDA Minor Version Compatibility (MVC) enables the use of a newer CUDA Toolkit version than the CUDA version supported by the driver, provided that the Toolkit and driver both have the same major version. For example, use of CUDA Toolkit 11.5 with CUDA driver 450 (CUDA version 11.0) is supported through MVC.

Numba supports MVC for CUDA 12 on Linux using the external `pynvjitlink` package.

Numba supports MVC for CUDA 11 on Linux using the external `cubinlinker` and `ptxcompiler` packages, subject to the following limitations:

- Linking of archives is unsupported.

- Cooperative Groups are unsupported, because they require an archive to be linked.

MVC is not supported on Windows.

## Installation

### CUDA 12

To use MVC support, the `pynvjitlink` package must be installed. To install using conda, use:

    conda install -c rapidsai pynvjitlink

To install with pip, use the NVIDIA package index:

    pip install --extra-index-url https://pypi.nvidia.com pynvjitlink-cu12

### CUDA 11

To use MVC support, the `cubinlinker` and `ptxcompiler` compiler packages must be installed from the appropriate channels. To install using conda, use:

    conda install -c rapidsai -c conda-forge cubinlinker ptxcompiler

To install with pip, use the NVIDIA package index:

    pip install --extra-index-url https://pypi.nvidia.com ptxcompiler-cu11 cubinlinker-cu11

## Enabling MVC Support

MVC support is enabled by setting the environment variable:

    export NUMBA_CUDA_ENABLE_MINOR_VERSION_COMPATIBILITY=1

or by setting a configuration variable prior to using any CUDA functionality in Numba:

    from numba import config
    config.CUDA_ENABLE_MINOR_VERSION_COMPATIBILITY = True

## References

Further information about Minor Version Compatibility may be found in:

- The CUDA Compatibility Guide.

- The README for pynvjitlink.

- The README for ptxcompiler.