GPU Support by Release

To use your GPU with MATLAB®, you must install a recent graphics driver. Best practice is to ensure you have the latest driver for your device. Installing the driver is sufficient for most uses of GPUs in MATLAB, including gpuArray and GPU-enabled MATLAB functions. You can download the latest drivers for your GPU device at NVIDIA Driver Downloads.

Supported GPUs

To see support for NVIDIA® GPU architectures by MATLAB release, consult the following table.

  • – Built-in binary support.

  • – Supported by NVIDIA's forward compatibility (requires recompilation). The MATLAB release was built before this GPU architecture was available. The CUDA® driver must recompile the GPU libraries because your device is more recent than the libraries. The first time you access the GPU from MATLAB, the compilation can take several minutes. Increase the CUDA cache size to prevent a recurrence of this delay. For instructions, see Increase the CUDA Cache Size.

  • – Support for Kepler and Maxwell GPU architectures will be removed in a future release. At that time, using a GPU with MATLAB will require a GPU device with compute capability 6.0 or greater. In R2020a, Kepler and Maxwell GPUs are still supported. MATLAB generates a warning the first time you use a Kepler or Maxwell GPU.

The cc numbers show the compute capability of the GPU architecture. To check your GPU compute capability, see ComputeCapability in the output of the gpuDevice function. Alternatively, see CUDA GPUs (NVIDIA).

MATLAB ReleaseTuring (cc7.5)Volta (cc7.0, cc7.2)Pascal (cc6.x)Maxwell (cc5.x)Kepler (cc3.x)Fermi (cc2.x)Tesla (cc1.3)CUDA Toolkit Version
R2020a

  10.1
R2019b

  10.1
R2019a

  10.0
R2018b

  9.1
R2018a

  9.0
R2017b

 8.0
R2017a

 8.0
R2016b

 7.5
R2016a

 7.5
R2015b

 7.0
R2015a

 6.5
R2014b

 6.0
R2014a

5.5
R2013b

5.0
R2013a

5.0
R2012b

4.2
R2012a

4.0
R2011b

4.0
R2011a

3.2
R2010b

3.1

CUDA Toolkit

If you want to use CUDAKernel objects or use GPU Coder, you must install a CUDA Toolkit. The CUDA Toolkit contains CUDA libraries and tools for compilation.

TaskRequirements

Use gpuArray and GPU-enabled MATLAB functions, or create CUDA enabled MEX-functions.

Get the latest graphics driver at NVIDIA Driver Downloads.

You do not need the CUDA Toolkit as well.

Create and use CUDAKernel objects or use GPU Coder.

Install the version of the CUDA Toolkit supported by your MATLAB release.

For more information about generating CUDA code in MATLAB, see Run MEX-Functions Containing CUDA Code and Run CUDA or PTX Code on GPU. Not all compilers supported by the CUDA Toolkit are supported in MATLAB.

For more information about the CUDA Toolkit and to download your supported version, see CUDA Toolkit Archive (NVIDIA).

Increase the CUDA Cache Size

If your GPU architecture does not have built-in binary support in your MATLAB release, the graphics driver must compile and cache the GPU libraries. This process can take a few minutes the first time you access the GPU from MATLAB. To increase the CUDA cache size to prevent a recurrence of this delay, set the environment variable CUDA_CACHE_MAXSIZE to a minimum of 536870912 (512 MB). For help setting an environment variable, see this example: Set the MATLABPATH Environment Variable (MATLAB).

Related Topics

External Websites