Skip to content

Support to make NVIDIA's Caffe fork (for NVIDIA DIGITS) work in Windows #6

Description

@lunzueta

@lukeyeager, I include you here because of your answer in this issue of DIGITS (NVIDIA/DIGITS#47). I'm not sure where on GitHub would be the best place to include this (here, @willyd's Caffe Windows port, NVIDIA's Caffe fork, DIGITS, or somewhere else), but I guess this could be a good place.

Based on @willyd's great Windows port and builder of Caffe (the most recent of the "unofficial Windows ports" cited in Caffe's Wiki: https://github.com/BVLC/caffe/wiki/Installation), I've done a first (unsuccessful) attempt to make NVIDIA's Caffe fork (https://github.com/NVIDIA/caffe) work in Windows too. I guess this is a necessary step to make NVIDIA DIGITS (https://github.com/NVIDIA/DIGITS) work in Windows, as I've seen that it has some extra files not included in this Caffe Windows port.

For that, in the Caffe.cmake file of Caffe-builder I replaced the repository from which Caffe is downloaded with that of NVIDIA's fork. Then, after compiling in VS2013-64-bit all the projects generated by Caffe-builder with NVIDIA's Caffe fork, the only one that failed was that of Caffe (obviously). So, I started checking what the compiler was reporting and based on that I did the following changes:

  1. Replaced the file caffe/include/caffe/util/io.hpp from NVIDIA's fork with that of Caffe's Windows port.
  2. Added caffe/include/caffe/util/msvc.hpp from Caffe's Windows port.
  3. Replaced caffe\src\caffe\layers\bnll_layer.cu with that of Caffe's Windows port.
  4. Updated caffe\src\caffe\common.cpp with some Windows-related code lines from that file of Caffe's Windows port.
  5. Replaced caffe\src\caffe\layers\contrastive_loss_layer.cpp with that of Caffe's Windows port.

After these changes I could solve some of the initial errors but I still get some that I don't know how to solve:

11>(MY_PATH)\DownloadCache\caffe\src\gtest/gtest.h(670): error C3855: 'std::tuple': template parameter '_Types' is incompatible with the declaration [(MY_PATH)\Caffe-prefix\src\Caffe-build\src\caffe\caffe.vcxproj]
11>(MY_PATH)\DownloadCache\caffe\src\gtest/gtest.h(670): error C2977: 'std::tuple' : too many template arguments [(MY_PATH)\Caffe-prefix\src\Caffe-build\src\caffe\caffe.vcxproj]
11>            C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\utility(75) : see declaration of 'std::tuple'
11>(MY_PATH)\DownloadCache\caffe\src\gtest/gtest.h(670): fatal error C1903: unable to recover from previous error(s); stopping compilation [(MY_PATH)\Caffe-prefix\src\Caffe-build\src\caffe\caffe.vcxproj]
11>    parallel.cpp
11>(MY_PATH)\DownloadCache\caffe\src\caffe\parallel.cpp(6): fatal error C1083: Cannot open include file: 'sys/ioctl.h': No such file or directory [(MY_PATH)\Caffe-prefix\src\Caffe-build\src\caffe\caffe.vcxproj]
11>    db.cpp
11>(MY_PATH)\DownloadCache\caffe\src\caffe\util\db.cpp(27): error C3861: 'mkdir': identifier not found [(MY_PATH)\Caffe-prefix\src\Caffe-build\src\caffe\caffe.vcxproj]
11>    math_functions.cpp
11>(MY_PATH)\DownloadCache\caffe\src\caffe\util\math_functions.cpp(186): warning C4244: 'argument' : conversion from 'const double' to 'const float', possible loss of data [(MY_PATH)\Caffe-prefix\src\Caffe-build\src\caffe\caffe.vcxproj]
11>(MY_PATH)\DownloadCache\caffe\src\caffe\util\math_functions.cpp(346): error C3861: '__builtin_popcount': identifier not found [(MY_PATH)\Caffe-prefix\src\Caffe-build\src\caffe\caffe.vcxproj]
11>(MY_PATH)\DownloadCache\caffe\src\caffe\util\math_functions.cpp(357): error C3861: '__builtin_popcountl': identifier not found [(MY_PATH)\Caffe-prefix\src\Caffe-build\src\caffe\caffe.vcxproj]

I'm not so experienced in porting so complex projects from Linux to Windows so that's why I got stuck, but my impression is that somebody more experienced could help to accomplish this goal. Can anybody help on this, please?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions