Skip to content

Build Caffe2 shared library on Windows#11160

Closed
mingzhe09088 wants to merge 4 commits intopytorch:masterfrom
mingzhe09088:caffe2-windows
Closed

Build Caffe2 shared library on Windows#11160
mingzhe09088 wants to merge 4 commits intopytorch:masterfrom
mingzhe09088:caffe2-windows

Conversation

@mingzhe09088
Copy link
Contributor

@mingzhe09088 mingzhe09088 commented Aug 31, 2018

Create this PR is to resolve Caffe2 shared library build issues on Windows machines.

@orionr @Yangqing

@zou3519 zou3519 added the caffe2 label Aug 31, 2018
@nwsterling
Copy link

Thank you for opening this thread. I have been trying for several days to build on Windows 10 Pro with VS2017. Would anyone please be able to point me in the right direction? I would appreciate it so immensely. My commands were as follows.....

set "VS150COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build"
set CMAKE_GENERATOR=Visual Studio 15 2017 Win64
set DISTUTILS_USE_SDK=1
REM The following two lines are needed for Python 2.7, but the support for it is very experimental.
set MSSdk=1
set FORCE_PY27_BUILD=1
REM As for CUDA 8, VS2015 Update 3 is also required to build PyTorch. Use the following two lines.
set "PREBUILD_COMMAND=%VS140COMNTOOLS%....\VC\vcvarsall.bat"
set PREBUILD_COMMAND_ARGS=x64

call "%VS150COMNTOOLS%\vcvarsall.bat" x64 -vcvars_ver=14.15
python setup.py install

OUTPUT

...

C:/Development/workspaces/repos/pytorch/aten/src/ATen/native/cuda/SpectralOps.cu(288): warning : dllexport/dllimpo
rt conflict with "at::native::_fft_cufft" [C:\Development\workspaces\repos\pytorch\build\caffe2\caffe2_gpu.vcxproj]

"c:\Development\workspaces\repos\pytorch\build\INSTALL.vcxproj" (default target) (1) ->
"C:\Development\workspaces\repos\pytorch\build\ALL_BUILD.vcxproj" (default target) (3) ->
"C:\Development\workspaces\repos\pytorch\build\caffe2\apply_test.vcxproj" (default target) (4) ->
"C:\Development\workspaces\repos\pytorch\build\caffe2\caffe2_gpu.vcxproj" (default target) (18) ->
(CustomBuild target) ->
C:/Development/workspaces/repos/pytorch/aten/src\ATen/core/ArrayRef.h(152): error : cannot use an entity undefined
in device code [C:\Development\workspaces\repos\pytorch\build\caffe2\caffe2_gpu.vcxproj]
C:/Development/workspaces/repos/pytorch/aten/src\ATen/core/ArrayRef.h(152): error : identifier "Typeinfo for ::at
::Error" is undefined in device code [C:\Development\workspaces\repos\pytorch\build\caffe2\caffe2_gpu.vcxproj]
Error : Internal Compiler error (codegen): "there was an error in verifying the lgenfe output!" [C:\Development\wo
rkspaces\repos\pytorch\build\caffe2\caffe2_gpu.vcxproj]

11950 Warning(s)
3 Error(s)

Time Elapsed 01:56:37.06

(py36) c:\Development\workspaces\repos\pytorch\build>IF ERRORLEVEL 1 exit 1
Failed to run 'tools\build_pytorch_libs.bat --use-cuda --use-nnpack caffe2 libshm_windows'

@nwsterling
Copy link

Forgot to mention I used python 3.6 in anaconda environment. Thank you!

@orionr
Copy link
Contributor

orionr commented Sep 4, 2018

@pytorchbot retest this please

@ezyang
Copy link
Contributor

ezyang commented Sep 4, 2018

@pytorchbot retest this please

@orionr
Copy link
Contributor

orionr commented Sep 4, 2018

@nicksterlingtek, look forward to getting this working. It might take a little bit, but definitely a top priority. :) Also feel free to follow along on #10765

@ezyang
Copy link
Contributor

ezyang commented Sep 4, 2018

@pytorchbot retest this please

1 similar comment
@ezyang
Copy link
Contributor

ezyang commented Sep 4, 2018

@pytorchbot retest this please

This comment was marked as off-topic.

@peterjc123
Copy link
Collaborator

Any updates on this PR? The current build failure was addressed in the recent Windows PRs.

@orionr
Copy link
Contributor

orionr commented Sep 7, 2018

This code landed as a part of #11266 so closing.

@orionr orionr closed this Sep 7, 2018
@orionr
Copy link
Contributor

orionr commented Sep 7, 2018

@peterjc123 can you check if your build failures are still an issue with master now?

@peterjc123
Copy link
Collaborator

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants