Cuda Update For Mac
The last vestiges of Nvidia and Apple’s long-term relationship are ending shortly. On Monday Nvidia published the release notes for the next update of its CUDA platform and noted that “CUDA 10. Download English (US), New Release 396.148. CUDA driver update to support CUDA Toolkit 9.2, macOS 10.13.6 and NVIDIA display driver 387.10.10.10.40.105.
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.
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:
Cuda Update Mac Mojave
- 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 when
CUDA_FORCE_PTX_JIT=1
is set. (SeeApplicationCompatibility for details.)
Cuda Update For Mac High Sierra
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-devel
TensorFlow Docker image as a base.
Install CUPTI which ships withthe CUDA® Toolkit. Append its installation directory to the $LD_LIBRARY_PATH
environmental variable:
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.
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.
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:
NVIDIA® CUDA Toolkit 11.0 no longer supports development or running applications on macOS. While there are no tools which use macOS as a target environment, NVIDIA is making macOS host versions of these tools that you can launch profiling and debugging sessions on supported target platforms.
You may download all these tools here. Note that the Nsight tools provide the ability to download these macOS host versions on their respective product pages.
Please visit each tool's overview page for more information about the tool and its supported target platforms.
The macOS host tools provided are:
- Nsight Systems - a system profiler and timeline trace tool supporting Pascal and newer GPUs
- Nsight Compute - a CUDA kernel profiler supporting Volta and new GPUs
- Visual Profiler - a CUDA kernel and system profiler and timeline trace tool supporting older GPUs (see installation instructions, below)
- cuda-gdb - a GPU and CPU CUDA application debugger (see installation instructions, below)
Instructions for installing cuda-gdb on the macOS
- This tar archive holds the distribution of the CUDA 11.0 cuda-gdb debugger front-end for macOS.
Native macOS debugging is not supported in this release. Remote debugging from a macOS host to other CUDA enabled targets, however, is supported.
- To install:
- Create an installation directory
- INSTALL_DIR=$HOME/cuda-gdb-darwin-11.0
mkdir $INSTALL_DIR
cd $INSTALL_DIR - Download the cuda-gdb-darwin-11.0.tar.gz tar archive into $INSTALL_DIR above
- Unpack the tar archive
- tar fxvz cuda-gdb-darwin-11.0.tar.gz
- Add the bin directory to your path
- PATH=$INSTALL_DIR/bin:$PATH
- Run cuda-gdb --version to confirm you're picking up the correct binaries
- cuda-gdb --version
- Download version: 8u144-b01 (Zulu: 8.23.0.3) .dmg.zip.tar.gz
- Download version: Zulu 8.23.0.3 (build 1.8.0_144-b01 .zip
You should see the following output:
- NVIDIA (R) CUDA Debugger
11.0 release
Portions Copyright (C) 2007-2020 NVIDIA Corporation
GNU gdb (GDB) 8.2
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
- https://docs.nvidia.com/cuda/profiler-users-guide/index.html#visual
Notes about JRE Requirements when using Visual Profiler on the macOS
- OpenJDK provides an open-source (and standards compliant) implementation of a Java compliant JVM.
Binaries are provided by various vendors such as Oracle, Azul Systems (Zulu), Amazon, Red Hat, IBM, etc.
- Visual Profiler needs to use an older version of Java, specifically JRE update 151, to work correctly.
This is currently not offered by Oracle JDK but is provided by Azul Systems (Zulu).
- The Bazel Build project also uses the Zulu builds of OpenJDK.
- Download JDK 8.0.144 to get JRE update 151: