<p dir="auto">Hello. I have been trying to build pytorch on Windows 10 Pro for about a week. I am really hitting a wall, and not sure how to proceed. I would appreciate so much any pointers that someone could give me. Here is my set of commands and output....</p>
<p dir="auto">INPUT</p>
<p dir="auto">set "VS150COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build"<br>
set CMAKE_GENERATOR=Visual Studio 15 2017 Win64<br>
set DISTUTILS_USE_SDK=1<br>
REM The following two lines are needed for Python 2.7, but the support for it is very experimental.<br>
set MSSdk=1<br>
set FORCE_PY27_BUILD=1<br>
REM As for CUDA 8, VS2015 Update 3 is also required to build PyTorch. Use the following two lines.<br>
set "PREBUILD_COMMAND=%VS140COMNTOOLS%....\VC\vcvarsall.bat"<br>
set PREBUILD_COMMAND_ARGS=x64</p>
<p dir="auto">call "%VS150COMNTOOLS%\vcvarsall.bat" x64 -vcvars_ver=14.15<br>
python setup.py install</p>
<p dir="auto">OUTPUT<br>
...</p>
<p dir="auto">C:/Development/workspaces/repos/pytorch/aten/src/ATen/native/cuda/SpectralOps.cu(288): warning : dllexport/dllimpo<br>
rt conflict with "at::native::_fft_cufft" [C:\Development\workspaces\repos\pytorch\build\caffe2\caffe2_gpu.vcxproj]</p>
<p dir="auto">"c:\Development\workspaces\repos\pytorch\build\INSTALL.vcxproj" (default target) (1) -&gt;<br>
"C:\Development\workspaces\repos\pytorch\build\ALL_BUILD.vcxproj" (default target) (3) -&gt;<br>
"C:\Development\workspaces\repos\pytorch\build\caffe2\apply_test.vcxproj" (default target) (4) -&gt;<br>
"C:\Development\workspaces\repos\pytorch\build\caffe2\caffe2_gpu.vcxproj" (default target) (18) -&gt;<br>
(CustomBuild target) -&gt;<br>
C:/Development/workspaces/repos/pytorch/aten/src\ATen/core/ArrayRef.h(152): error : cannot use an entity undefined<br>
in device code [C:\Development\workspaces\repos\pytorch\build\caffe2\caffe2_gpu.vcxproj]<br>
C:/Development/workspaces/repos/pytorch/aten/src\ATen/core/ArrayRef.h(152): error : identifier "Typeinfo for ::at<br>
::Error" is undefined in device code [C:\Development\workspaces\repos\pytorch\build\caffe2\caffe2_gpu.vcxproj]<br>
Error : Internal Compiler error (codegen): "there was an error in verifying the lgenfe output!" [C:\Development\wo<br>
rkspaces\repos\pytorch\build\caffe2\caffe2_gpu.vcxproj]</p>
<p dir="auto">11950 Warning(s)<br>
3 Error(s)<br>
Time Elapsed 01:56:37.06</p>
<p dir="auto">(py36) c:\Development\workspaces\repos\pytorch\build&gt;IF ERRORLEVEL 1 exit 1<br>
Failed to run 'tools\build_pytorch_libs.bat --use-cuda --use-nnpack caffe2 libshm_windows'</p>
<h2 dir="auto">Bug</h2>
<p dir="auto">Internal compiler error on Windows with CUDA build.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Error: Internal Compiler Error (codegen): &quot;there was an error in verifying the lgenfe output!&quot;

cross_entropy_op.cu
CMake Error at caffe2_gpu_generated_cross_entropy_op.cu.obj.RelWithDebInfo.cmake:279 (message):
  Error generating file
  C:/Users/tolia/AppData/Local/Temp/pytorch/build/caffe2/CMakeFiles/caffe2_gpu.dir/operators/./caffe2_gpu_generated_cross_entropy_op.cu.obj"><pre class="notranslate"><code class="notranslate">Error: Internal Compiler Error (codegen): "there was an error in verifying the lgenfe output!"

cross_entropy_op.cu
CMake Error at caffe2_gpu_generated_cross_entropy_op.cu.obj.RelWithDebInfo.cmake:279 (message):
  Error generating file
  C:/Users/tolia/AppData/Local/Temp/pytorch/build/caffe2/CMakeFiles/caffe2_gpu.dir/operators/./caffe2_gpu_generated_cross_entropy_op.cu.obj
</code></pre></div>
<h2 dir="auto">Environment</h2>
<ul dir="auto">
<li>PyTorch Version (e.g., 1.0): master</li>
<li>OS (e.g., Linux): Win10</li>
<li>How you installed PyTorch (<code class="notranslate">conda</code>, <code class="notranslate">pip</code>, source): source</li>
<li>Build command you used (if compiling from source): cmake + VS2017 (15.9.4) + Ninja</li>
<li>Python version: 3.7</li>
<li>CUDA/cuDNN version: 10.0/7</li>
<li>GPU models and configuration: Kepler + Pascal (build for Kepler+Maxwell+Pascal+Volta)</li>
</ul>
<h2 dir="auto">Additional context</h2>
<p dir="auto">Noticed several similar reports: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="364209606" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/12117" data-hovercard-type="issue" data-hovercard-url="/pytorch/pytorch/issues/12117/hovercard" href="https://github.com/pytorch/pytorch/issues/12117">#12117</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="388471366" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/14872" data-hovercard-type="issue" data-hovercard-url="/pytorch/pytorch/issues/14872/hovercard" href="https://github.com/pytorch/pytorch/issues/14872">#14872</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="379423240" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/13808" data-hovercard-type="issue" data-hovercard-url="/pytorch/pytorch/issues/13808/hovercard" href="https://github.com/pytorch/pytorch/issues/13808">#13808</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="356570303" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/11203" data-hovercard-type="issue" data-hovercard-url="/pytorch/pytorch/issues/11203/hovercard" href="https://github.com/pytorch/pytorch/issues/11203">#11203</a></p>