Skip to content

Instantly share code, notes, and snippets.

@AnonymousArthur
Last active April 24, 2018 13:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AnonymousArthur/154c34be87c9cf8b547b0dd4c096a49d to your computer and use it in GitHub Desktop.
Save AnonymousArthur/154c34be87c9cf8b547b0dd4c096a49d to your computer and use it in GitHub Desktop.
Caffe 2 + GPU support installation on Windows 10 build 1709 + Visual Studio 15.4.5 2017 + CUDA 9.1 + cuDNN 7.1

Refrence Caffe 2 Assuming python is already installed and you've done this step Install within a virtual environment is recommended. So it doesn't pollute your system envrionment, and you can always retry.

  1. Download Visual Studio 15.4.5 CE, do not download the latest 15.6.X because CUDA 9.1 doesn't support that.
  2. Launch the VS installer, select development with C++ and also select C++/CLI support and VC++ 2015.3 v140 toolset. DO NOT UNSELECT ANY SELECTED OPTIONS!!!
  3. Download CUDA 9.1 and cuDNN7.1 from Nvidia, install and patch CUDA if necessary, and then put cnDNN stuff into installation folder as instructed. This step must be performed after step 2 complete.
  4. Download and Install CMAKE
  5. Clone the project, it is now a subproject of pyTorch. Use the link: [git clone --recursive https://github.com/pytorch/pytorch.git ](git clone --recursive https://github.com/pytorch/pytorch.git)
  6. Go to pytorch\scripts. Modify build_windows.bat, for us: SET USE_CUDA=ON SET CMAKE_GENERATOR="Visual Studio 15 2017 Win64"
  7. Open Visual Studio 2017 Prompt(DO NOT open normal cmd!!!)
  8. Go to the \scripts\
  9. execute build_windows.bat and then you wait (very long time).
  10. The finishing up stuff go Caffe 2 and do it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment