CamJohnson26 CamJohnson26 - 1 month ago 110
Python Question

Compiling tensorflow pip package for GPU in Windows

I am brand new to tensorflow and was really excited to see the GPU support for windows. I've set up all dependencies and gotten to where I can kick off a build, but now after compiling for 2 hours it fails with:

"C:\Users\Cameron\Desktop\tensorflow\tensorflow\tensorflow\contrib\cmake\build\tf_python_build_pip_package.vcxproj" (de
fault target) (1) ->
"C:\Users\Cameron\Desktop\tensorflow\tensorflow\tensorflow\contrib\cmake\build\pywrap_tensorflow.vcxproj" (default targ
et) (3) ->
"C:\Users\Cameron\Desktop\tensorflow\tensorflow\tensorflow\contrib\cmake\build\tf_core_gpu_kernels.vcxproj" (default ta
rget) (33) ->
(CustomBuild target) ->
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" e
xited with code 1. [C:\Users\Cameron\Desktop\tensorflow\tensorflow\tensorflow\contrib\cmake\build\tf_core_gpu_kernels.v
cxproj]

363 Warning(s)
1 Error(s)

Time Elapsed 01:58:39.47


I've worked through a million other issues to get to this point, trying my best to stick to the readme: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/cmake/README.md

Feel fairly confident that my dependencies are set up correct or wouldn't think I could have gotten this far, but the only thing different on my system is that I don't see "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvarsall.bat", I had to run the vcvarsall file from the \VC folder instead.

This is a lot of topics I'm new to having never used cmake or MSBuild before, so I'd appreciate any help no matter how basic.

Answer

This ended up being an issue with using the 3.7 version of CMake, the package only supported 3.6 for this build. Still can't build the whole thing but it's different problems now. Can see the whole discussion on the github pull request here: https://github.com/tensorflow/tensorflow/pull/5071