Cuda Toolkit For Mac

Google is committed to advancing racial equity for Black communities. See how.
Cuda toolkit 11

The CUDA Toolkit requires that the  The CUDA Development Tools require an Intel-based Mac running Mac OSX v. To check which version you have, go. CUDA Driver for Mac is a very useful software package that provides support for a large collection of NVIDIA video cards. The CUDA Driver is designed for all NVIDIA products available on the Mac.

Note: GPU support is available for Ubuntu and Windows with CUDA®-enabled cards.Mac

TensorFlow GPU support requires an assortment of drivers and libraries. Tosimplify installation and avoid library conflicts, we recommend using aTensorFlow Docker image with GPU support (Linux only). This setuponly requires the NVIDIA® GPU drivers.

These install instructions are for the latest release of TensorFlow. See thetested build configurations for CUDA® and cuDNN versions touse with older TensorFlow releases.

Cuda toolkit archive

Pip package

See the pip install guide for available packages, systems requirements,and instructions. The TensorFlow pip package includes GPU support forCUDA®-enabled cards:

This guide covers GPU support and installation steps for the latest stableTensorFlow release.

Older versions of TensorFlow

For releases 1.15 and older, CPU and GPU packages are separate:

Hardware requirements

The following GPU-enabled devices are supported:

  • NVIDIA® GPU card with CUDA® architectures 3.5, 3.7, 5.2, 6.0, 6.1, 7.0 andhigher than 7.0. See the list ofCUDA®-enabledGPU cards.
  • On systems with NVIDIA® Ampere GPUs (CUDA architecture 8.0) or newer,kernels are JIT-compiled from PTX and TensorFlow can take over 30 minutes tostart up. This overhead can be limited to the first start up by increasingthe default JIT cache size with: 'export CUDA_CACHE_MAXSIZE=2147483648'(seeJITCaching for details).
  • For GPUs with unsupported CUDA® architectures, or to avoid JIT compilationfrom PTX, or to use different versions of the NVIDIA® libraries, see theLinux build from source guide.
  • Packages do not contain PTX code except for the latest supported CUDA®architecture; therefore, TensorFlow fails to load on older GPUs whenCUDA_FORCE_PTX_JIT=1 is set. (SeeApplicationCompatibility for details.)
DownloadNote: The error message 'Status: device kernel image is invalid' indicates thatthe TensorFlow package does not contain PTX for your architecture. You canenable compute capabilities by building TensorFlow from source.

Software requirements

The following NVIDIA® software must be installed on your system:

  • NVIDIA® GPU drivers —CUDA®10.1 requires 418.x or higher.
  • CUDA® Toolkit —TensorFlow supports CUDA® 10.1 (TensorFlow >= 2.1.0)
  • CUPTI ships with the CUDA®Toolkit.
  • cuDNN SDK 7.6 (seecuDNN versions).
  • (Optional)TensorRT 6.0 to improve latency and throughput for inference on some models.

Linux setup

The apt instructions below are the easiest way to install the required NVIDIAsoftware on Ubuntu. However, if building TensorFlow from source,manually install the software requirements listed above, and consider using a-develTensorFlow Docker image as a base.

Install CUPTI which ships withthe CUDA® Toolkit. Append its installation directory to the $LD_LIBRARY_PATHenvironmental variable:

Cuda Toolkit Linux

Install CUDA with apt

This section shows how to install CUDA® 10 (TensorFlow >= 1.13.0) on Ubuntu16.04 and 18.04. These instructions may work for other Debian-based distros.

Caution:Secure Boot complicates installation of the NVIDIA driver and is beyond the scope of these instructions.

Ubuntu 18.04 (CUDA 10.1)

Ubuntu 16.04 (CUDA 10.1)

Windows setup

See the hardware requirements andsoftware requirements listed above. Read theCUDA® install guide for Windows.

Cuda Toolkit Download

Make sure the installed NVIDIA software packages match the versions listed above. Inparticular, TensorFlow will not load without the cuDNN64_7.dll file. To use adifferent version, see the Windows build from source guide.

Cuda Toolkit 10.1

Add the CUDA®, CUPTI, and cuDNN installation directories to the %PATH%environmental variable. For example, if the CUDA® Toolkit is installed toC:Program FilesNVIDIA GPU Computing ToolkitCUDAv10.1 and cuDNN toC:toolscuda, update your %PATH% to match: