https://github.com/Microsoft/CNTK
Revision 3cf3af5df6d0071f282b6696bcafca9f4838dabd authored by KeDengMS on 23 January 2018, 00:58:56 UTC, committed by KeDengMS on 23 January 2018, 00:58:56 UTC
CNTK now supports CUDA 9/cuDNN 7. This requires an update to build environment to Ubuntu 16/GCC 5 for Linux, and Visual Studio 2017/VCTools 14.11 for Windows. With CUDA 9, CNTK also added a preview for 16-bit floating point (a.k.a FP16) computation.

Please check out the example of FP16 in ResNet50 at /Examples/Image/Classification/ResNet/Python/TrainResNet_ImageNet_Distributed.py

Notes on FP16 preview:
* FP16 implementation on CPU is not optimized, and it's not supposed to be used in CPU inference directly. User needs to convert the model to 32-bit floating point before running on CPU.
* Loss/Criterion for FP16 training needs to be 32bit for accumulation without overflow, using cast function. Please check the example above.
* Readers do not have FP16 output unless using numpy to feed data, cast from FP32 to FP16 is needed. Please check the example above.
* FP16 gradient aggregation is currently only implemented on GPU using NCCL2. Distributed training with FP16 with MPI is not supported.
* FP16 math is a subset of current FP32 implementation. Some model may get Feature Not Implemented exception using FP16.
* FP16 is currently not supported in BrainScript. Please use Python for FP16.

To setup build and runtime environment on Windows:
* Install [Visual Studio 2017](https://www.visualstudio.com/downloads/) with following workloads and components. From command line (use Community version installer as example):
    vs_community.exe --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.Universal --add Microsoft.Component.PythonTools --add Microsoft.VisualStudio.Component.VC.Tools.14.11
* Install [NVidia CUDA 9](https://developer.nvidia.com/cuda-90-download-archive?target_os=Windows&target_arch=x86_64)
* From PowerShell, run:
    /Tools/devInstall/Windows/DevInstall.ps1
* Start VCTools 14.11 command line, run:
    cmd /k "%VS2017INSTALLDIR%\VC\Auxiliary\Build\vcvarsall.bat" x64 --vcvars_ver=14.11
* Open /CNTK.sln from the VCTools 14.11 command line. Note that starting CNTK.sln other than VCTools 14.11 command line, would causes CUDA 9 [build error](https://developercommunity.visualstudio.com/content/problem/163758/vs-2017-155-doesnt-support-cuda-9.html).

To setup build and runtime environment on Linux using docker, please build Unbuntu 16.04 docker image using Dockerfiles /Tools/docker. For other Linux systems, please refer to the Dockerfiles to setup dependent libraries for CNTK.
1 parent 3765da9
History
Tip revision: 3cf3af5df6d0071f282b6696bcafca9f4838dabd authored by KeDengMS on 23 January 2018, 00:58:56 UTC
CNTK support for CUDA 9
Tip revision: 3cf3af5
File Mode Size
Documentation
Examples
Manual
PretrainedModels
Scripts
Source
Tests
Tools
Tutorials
bindings
.clang-format -rw-r--r-- 931 bytes
.gitattributes -rw-r--r-- 3.3 KB
.gitignore -rw-r--r-- 7.4 KB
.gitmodules -rw-r--r-- 211 bytes
CNTK.Common.props -rw-r--r-- 1.6 KB
CNTK.Cpp.props -rw-r--r-- 10.2 KB
CNTK.sln -rw-r--r-- 214.8 KB
CONTRIBUTING.md -rw-r--r-- 210 bytes
CppCntk.vssettings -rw-r--r-- 10.0 KB
LICENSE.md -rw-r--r-- 7.9 KB
Makefile -rw-r--r-- 61.5 KB
README.md -rw-r--r-- 14.1 KB
configure -rwxr-xr-x 34.3 KB

README.md

back to top