Skip to content

CNTK move to Cuda8

Wolfgang Manousek edited this page Nov 25, 2016 · 6 revisions

The Cognitive Toolkit and CUDA 8

With the release of CNTK 2 Beta 5 (November 25th, 2016) the toolkit started to moved to support NVIDIA CUDA 8 as the development toolkit for GPU accelerated applications. This allows the Microsoft Cognitive Toolkit to take advantage of the latest improvements in NVIDIA graphic cards and optimizations.

As the first step this move is implemented on the Windows platform. The support of CUDA 8 for the Microsoft Cognitive Toolkit on Linux will follow soon!

For a developer this is currently an optional move. You can still do your CNTK development and testing with NVIDIA CUDA 7.5. Here at Microsoft we moved our Cognitive Toolkit Windows development and testing environment to CUDA 8. We will not do any further development or testing on CUDA 7.5. In the next few weeks we will make NVIDIA CUDA 8 a mandatory requirement for the Microsoft Cognitive Toolkit on Windows and Linux.

Windows

CNTK Binary Packages on Windows

The CNTK binary packages you download starting with Beta 5 contains the NVIDIA CUDA 8 runtime components. You don't need to download any additional components. We recommend to check the NVIDIA website for the latest set of drivers for your NVIDIA graphics card.

Updating the Windows Development Environment from CUDA 7.5 to CUDA 8.0

Setting up a Windows development environment for the Microsoft Cognitive Toolkit from scratch is described here. If you already have a working development environment for CNTK using CUDA 7.5, you need to follow these steps to upgrade to CUDA 8.0:

CUDA 8

The NVIDIA CUDA 7.5 development environment and the CUDA 8.0 development environment can live side-by-side on your machine, but you can also deinstall the CUDA 7.5 toolkit.

Download and install the NVIDIA CUDA 8.0 Toolkit:

Make sure that the following CUDA environment variables are set to the correct path (the NVIDIA CUDA installer will create these for you). Default installation paths are assumed:

CUDA_PATH="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0"
CUDA_PATH_V8_0="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0"

cuDNN

Install NVIDIA CUDA Deep Neural Network library also known as cuDNN in the version NVIDIA: cuDNN v5.1 for CUDA 8.0 from this link. This version is suitable for Windows 8.1, Windows 10, as well as Windows Server 2012 R2.

  • Extract the archive to a folder on your local disk, e.g. to C:\local\cudnn-8.0-v5.1\ and set the environment variable CUDNN_PATH pointing to that location, e.g.:
    setx CUDNN_PATH C:\local\cudnn-8.0-v5.1\CUDA
  • Quick installation check: If you followed the instruction above and used the same paths, the command dir C:\local\cudnn-8.0-v5.1\CUDA\include\cudnn.h will succeed.

Latest GPU card driver

Now install the latest driver for your GPU card:

Final steps

You can now restart Visual Studio and open the CNTK project. Please rebuild to make sure all components are recreated with the new toolsets.

Linux

Linux is still using the NVIDIA CUDA 7.5 toolset. This will change soon.

Clone this wiki locally