<h2 dir="auto"><g-emoji class="g-emoji" alias="bug" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f41b.png">🐛</g-emoji> Bug</h2>

<p dir="auto">[1331/2730] Building CXX object caffe2\CMakeFiles\torch_cpu.dir\core\blob_serialization.cc.obj<br>
FAILED: caffe2/CMakeFiles/torch_cpu.dir/core/blob_serialization.cc.obj<br>
C:\PROGRA<del>2\MICROS</del>4\2019\COMMUN<del>1\VC\Tools\MSVC\1424</del>1.283\bin\Hostx64\x64\cl.exe  /nologo /TP -DAT_PARALLEL_OPENMP=1 -DCPUINFO_SUPPORTED_PLATFORM=1 -DONNX_ML=1 -DONNX_NAMESPACE=onnx_torch -DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_DEPRECATE=1 -Dtorch_cpu_EXPORTS -Iaten\src -I..\aten\src -I. -I..\ -I..\cmake..\third_party\benchmark\include -Icaffe2\contrib\aten -I..\third_party\onnx -Ithird_party\onnx -I..\third_party\foxi -Ithird_party\foxi -I..\caffe2..\torch\csrc\api -I..\caffe2..\torch\csrc\api\include -I..\caffe2\aten\src\TH -Icaffe2\aten\src\TH -I..\caffe2..\torch..\aten\src -Icaffe2\aten\src -Icaffe2..\aten\src -Icaffe2..\aten\src\ATen -I..\caffe2..\torch\csrc -I..\caffe2..\torch..\third_party\miniz-2.0.8 -I..\aten\src\TH -I..\aten..\third_party\catch\single_include -I..\aten\src\ATen.. -Icaffe2\aten\src\ATen -I..\third_party\miniz-2.0.8 -I..\caffe2\core\nomnigraph\include -I..\c10.. -I..\third_party\cpuinfo\include -I..\third_party\FP16\include -I..\cmake..\third_party\googletest\googlemock\include -I..\cmake..\third_party\googletest\googletest\include -I..\third_party\protobuf\src -I..\cmake..\third_party\eigen -ID:\Aanaconda3\include -ID:\Aanaconda3\lib\site-packages\numpy\core\include -I..\cmake..\third_party\pybind11\include -I\opt\rocm\hip\include -I\include -I..\cmake..\third_party\cub -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" -I..\caffe2 /DWIN32 /D_WINDOWS /GR  /w /EHa /MP /bigobj -openmp:experimental -DHAVE_AVX_CPU_DEFINITION -DHAVE_AVX2_CPU_DEFINITION /MD /O2 /Ob2  /w /EHa /MP /bigobj   -DCUDA_HAS_FP16=1 -DUSE_GCC_GET_CPUID -DUSE_AVX -DUSE_AVX2 -DTH_HAVE_THREAD /Z7 /EHa /DNOMINMAX /wd4267 /wd4251 /wd4522 /wd4838 /wd4305 /wd4244 /wd4190 /wd4101 /wd4996 /wd4275 /bigobj -O2 -DCAFFE2_BUILD_MAIN_LIB -DONNX_BUILD_MAIN_LIB -std:c++14 /showIncludes /Focaffe2\CMakeFiles\torch_cpu.dir\core\blob_serialization.cc.obj /Fdcaffe2\CMakeFiles\torch_cpu.dir\ /FS -c ..\caffe2\core\blob_serialization.cc<br>
D:\code\Obj_tracking\pytorch\caffe2/core/context_base.h(92): error C2338: CopyToCPU requires fundamental types<br>
..\caffe2\core\blob_serialization.cc(602): note: 查看对正在编译的函数 模板 实例化“void at::BaseContext::CopyToCPUc10::Half(size_t,const T *,T *)”的引用<br>
with<br>
[<br>
T=c10::Half<br>
]<br>
ninja: build stopped: subcommand failed.<br>
-- Building version 1.4.0a0+190dac1<br>
cmake -GNinja -DBUILD_PYTHON=True -DBUILD_TEST=True -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=D:\code\Obj_tracking\pytorch\torch -DCMAKE_PREFIX_PATH=D:\Aanaconda3\Lib\site-packages -DNUMPY_INCLUDE_DIR=D:\Aanaconda3\lib\site-packages\numpy\core\include -DPYTHON_EXECUTABLE=D:\Aanaconda3\python.exe -DPYTHON_INCLUDE_DIR=D:\Aanaconda3\include -DPYTHON_LIBRARY=D:\Aanaconda3/libs/python37.lib -DTORCH_BUILD_VERSION=1.4.0a0+190dac1 -DUSE_NUMPY=True D:\code\Obj_tracking\pytorch<br>
cmake --build . --target install --config Release -- -j 32<br>
Traceback (most recent call last):<br>
File "setup.py", line 755, in <br>
build_deps()<br>
File "setup.py", line 316, in build_deps<br>
cmake=cmake)<br>
File "D:\code\Obj_tracking\pytorch\tools\build_pytorch_libs.py", line 62, in build_caffe2<br>
cmake.build(my_env)<br>
File "D:\code\Obj_tracking\pytorch\tools\setup_helpers\cmake.py", line 337, in build<br>
self.run(build_args, my_env)<br>
File "D:\code\Obj_tracking\pytorch\tools\setup_helpers\cmake.py", line 141, in run<br>
check_call(command, cwd=self.build_dir, env=env)<br>
File "D:\Aanaconda3\lib\subprocess.py", line 347, in check_call<br>
raise CalledProcessError(retcode, cmd)<br>
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'install', '--config', 'Release', '--', '-j', '32']' returned non-zero exit status 1.<br>
Here is the build.log</p>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">Steps to reproduce the behavior:</p>
<p dir="auto">1.git clone --recursive <a href="https://github.com/pytorch/pytorch">https://github.com/pytorch/pytorch</a><br>
2.cd pytorch<br>
3.python setup.py install</p>

<h2 dir="auto">Expected</h2>
<blockquote>
<p dir="auto">behavior</p>
</blockquote>

<h2 dir="auto">Environment</h2>
<p dir="auto">Collecting environment information...<br>
PyTorch version: N/A<br>
Is debug build: N/A<br>
CUDA used to build PyTorch: N/A</p>
<p dir="auto">OS: Microsoft Windows 10<br>
GCC version: (MinGW.org GCC-8.2.0-5) 8.2.0<br>
CMake version: version 3.16.0</p>
<p dir="auto">Python version: 3.7<br>
Is CUDA available: N/A<br>
CUDA runtime version: 10.1.243<br>
GPU models and configuration: GPU 0: GeForce GTX TITAN X<br>
Nvidia driver version: 426.00<br>
cuDNN version: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\cudnn64_7.dll</p>
<p dir="auto">Versions of relevant libraries:<br>
[pip] numpy==1.16.5<br>
[pip] numpydoc==0.9.1<br>
[conda] blas                      1.0                         mkl<br>
[conda] mkl                       2019.4                      245<br>
[conda] mkl-include               2019.4                      245<br>
[conda] mkl-service               2.3.0            py37hb782905_0<br>
[conda] mkl_fft                   1.0.14           py37h14836fe_0<br>
[conda] mkl_random                1.1.0            py37h675688f_0</p>
<h2 dir="auto">Additional context</h2>
<h2 dir="auto"><g-emoji class="g-emoji" alias="bug" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f41b.png">🐛</g-emoji> Bug</h2>
<p dir="auto">For some days, I have a broken build on Windows (cf. appended error message)</p>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">Steps to reproduce the behavior:</p>
<ol dir="auto">
<li>Pull master, submodules etc.</li>
<li>(Opt.) clear build directory</li>
<li>Build pytorch</li>
</ol>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">A finishing build</p>
<h2 dir="auto">Environment</h2>
<p dir="auto">PyTorch version: N/A<br>
Is debug build: N/A<br>
CUDA used to build PyTorch: N/A</p>
<p dir="auto">OS: Microsoft Windows 10 Pro<br>
GCC version: Could not collect<br>
CMake version: version 3.16.0</p>
<p dir="auto">Python version: 3.7<br>
Is CUDA available: N/A<br>
CUDA runtime version: 10.2.89<br>
GPU models and configuration: GPU 0: Quadro M1200<br>
Nvidia driver version: 441.28<br>
cuDNN version: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin\cudnn64_7.dll</p>
<p dir="auto">Versions of relevant libraries:<br>
[pip3] msgpack-numpy==0.4.4.3</p>
<p dir="auto">[pip3] numpy==1.17.4+mkl</p>
<p dir="auto">[pip3] numpydoc==0.9.1</p>
<p dir="auto">[pip3] torch==1.3.1  # I don't know, what this means - my pip call lists the same development version as conda</p>
<p dir="auto">[pip3] torchvision==0.4.2<br>
[conda] blas                      1.0                         mkl</p>
<p dir="auto">[conda] libblas                   3.8.0                    14_mkl    conda-forge</p>
<p dir="auto">[conda] libcblas                  3.8.0                    14_mkl    conda-forge</p>
<p dir="auto">[conda] liblapack                 3.8.0                    14_mkl    conda-forge</p>
<p dir="auto">[conda] liblapacke                3.8.0                    14_mkl    conda-forge</p>
<p dir="auto">[conda] mkl                       2019.4                      245</p>
<p dir="auto">[conda] mkl-include               2019.4                      245</p>
<p dir="auto">[conda] mkl-service               2.3.0            py37hfa6e2cd_0    conda-forge</p>
<p dir="auto">[conda] pytorch-sphinx-theme      0.0.24                    dev_0    </p>
<p dir="auto">[conda] torch                     1.4.0a0+6e145b4          pypi_0    pypi</p>
<p dir="auto">[conda] torchvision               0.5.0a0+95131de          pypi_0    pypi</p>
<h2 dir="auto">Additional context</h2>
<p dir="auto">MS Visual Studio got an update lately - maybe the used C++ compiler is worth a check:</p>
<p dir="auto"><code class="notranslate">Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\bin\Hostx64\x64\cl.exe</code></p>
<p dir="auto">Error message from build:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[95/995] Building CXX object caffe2\CMakeFiles\torch_cpu.dir\core\blob_serialization.cc.obj                                                                                                               
FAILED: caffe2/CMakeFiles/torch_cpu.dir/core/blob_serialization.cc.obj                                                                                                                                    
C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\1424~1.283\bin\Hostx64\x64\cl.exe  /nologo /TP -DAT_PARALLEL_OPENMP=1 -DCPUINFO_SUPPORTED_PLATFORM=1 -DONNX_ML=1 -DONNX_NAMESPACE=onnx_torch -DTH_BLAS_MK
L -DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_DEPRECATE=1 -D_OPENMP_NOFORCE_MANIFEST -Dtorch_cpu_EXPORTS -Iaten\src -I..\aten\src -I. -I..\ -I..\cmake\..\third_party\benchmark\include -I..\third_party\onnx -
Ithird_party\onnx -I..\third_party\foxi -Ithird_party\foxi -I..\caffe2\..\torch\csrc\api -I..\caffe2\..\torch\csrc\api\include -I..\caffe2\aten\src\TH -Icaffe2\aten\src\TH -I..\caffe2\..\torch\..\aten\s
rc -Icaffe2\aten\src -Icaffe2\..\aten\src -Icaffe2\..\aten\src\ATen -I..\caffe2\..\torch\csrc -I..\caffe2\..\torch\..\third_party\miniz-2.0.8 -I..\aten\src\TH -I..\aten\..\third_party\catch\single_inclu
de -I..\aten\src\ATen\.. -Icaffe2\aten\src\ATen -I..\third_party\miniz-2.0.8 -I..\caffe2\core\nomnigraph\include -I..\c10\.. -I..\third_party\cpuinfo\include -I..\third_party\FP16\include -I..\cmake\..\
third_party\googletest\googlemock\include -I..\cmake\..\third_party\googletest\googletest\include -I..\third_party\protobuf\src -I&quot;C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\mkl
\include&quot; -IV:\bin\scripting\python\conda\envs\pytorch\Library\include -I..\cmake\..\third_party\eigen -IV:\bin\scripting\python\conda\envs\pytorch\include -Iv:\bin\scripting\python\conda\envs\pytorch\l
ib\site-packages\numpy\core\include -I..\torch\include -I..\cmake\..\third_party\cub -I&quot;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\include&quot; -I..\caffe2 /DWIN32 /D_WINDOWS /GR  /w /EHa /MP 
/bigobj -openmp:experimental -DHAVE_AVX_CPU_DEFINITION -DHAVE_AVX2_CPU_DEFINITION /MD /O2 /Ob2  /w /EHa /MP /bigobj   -DCUDA_HAS_FP16=1 -DUSE_GCC_GET_CPUID -DUSE_AVX -DUSE_AVX2 -DTH_HAVE_THREAD /Z7 /EHa
 /DNOMINMAX /wd4267 /wd4251 /wd4522 /wd4838 /wd4305 /wd4244 /wd4190 /wd4101 /wd4996 /wd4275 /bigobj -O2 -DCAFFE2_BUILD_MAIN_LIB -DONNX_BUILD_MAIN_LIB -std:c++14 /showIncludes /Focaffe2\CMakeFiles\torch_
cpu.dir\core\blob_serialization.cc.obj /Fdcaffe2\CMakeFiles\torch_cpu.dir\ /FS -c ..\caffe2\core\blob_serialization.cc                                                                                    
V:\src\git\pytorch\src\pytorch\caffe2/core/context_base.h(92): error C2338: CopyToCPU requires fundamental types                                                                                          
..\caffe2\core\blob_serialization.cc(602): note: see reference to function template instantiation 'void at::BaseContext::CopyToCPU&lt;c10::Half&gt;(size_t,const T *,T *)' being compiled                       
        with                                                                                                                                                                                              
        [                                                                                                                                                                                                 
            T=c10::Half                                                                                                                                                                                   
        ]                                                                                                                                                                                                 
[102/995] Building CXX object caffe2\CMakeFiles\torch_cpu.dir\opt\onnxifi_op.cc.obj                                                                                                                       
ninja: build stopped: subcommand failed.                                                                                                                                                                  
Traceback (most recent call last):                                                                                                                                                                        
  File &quot;setup.py&quot;, line 755, in &lt;module&gt;                                                                                                                                                                  
    build_deps()                                                                                                                                                                                          
  File &quot;setup.py&quot;, line 316, in build_deps                                                                                                                                                                
    cmake=cmake)                                                                                                                                                                                          
  File &quot;v:\src\git\pytorch\src\pytorch\tools\build_pytorch_libs.py&quot;, line 62, in build_caffe2                                                                                                             
    cmake.build(my_env)                                                                                                                                                                                   
  File &quot;v:\src\git\pytorch\src\pytorch\tools\setup_helpers\cmake.py&quot;, line 337, in build                                                                                                                  
    self.run(build_args, my_env)                                                                                                                                                                          
  File &quot;v:\src\git\pytorch\src\pytorch\tools\setup_helpers\cmake.py&quot;, line 141, in run                                                                                                                    
    check_call(command, cwd=self.build_dir, env=env)                                                                                                                                                      
  File &quot;v:\bin\scripting\python\conda\envs\pytorch\lib\subprocess.py&quot;, line 347, in check_call                                                                                                            
    raise CalledProcessError(retcode, cmd)                                                                                                                                                                
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'install', '--config', 'Release', '--', '-j', '8']' returned non-zero exit status 1.
```                                       `


cc @peterjc123"><pre class="notranslate"><code class="notranslate">[95/995] Building CXX object caffe2\CMakeFiles\torch_cpu.dir\core\blob_serialization.cc.obj                                                                                                               
FAILED: caffe2/CMakeFiles/torch_cpu.dir/core/blob_serialization.cc.obj                                                                                                                                    
C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\1424~1.283\bin\Hostx64\x64\cl.exe  /nologo /TP -DAT_PARALLEL_OPENMP=1 -DCPUINFO_SUPPORTED_PLATFORM=1 -DONNX_ML=1 -DONNX_NAMESPACE=onnx_torch -DTH_BLAS_MK
L -DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_DEPRECATE=1 -D_OPENMP_NOFORCE_MANIFEST -Dtorch_cpu_EXPORTS -Iaten\src -I..\aten\src -I. -I..\ -I..\cmake\..\third_party\benchmark\include -I..\third_party\onnx -
Ithird_party\onnx -I..\third_party\foxi -Ithird_party\foxi -I..\caffe2\..\torch\csrc\api -I..\caffe2\..\torch\csrc\api\include -I..\caffe2\aten\src\TH -Icaffe2\aten\src\TH -I..\caffe2\..\torch\..\aten\s
rc -Icaffe2\aten\src -Icaffe2\..\aten\src -Icaffe2\..\aten\src\ATen -I..\caffe2\..\torch\csrc -I..\caffe2\..\torch\..\third_party\miniz-2.0.8 -I..\aten\src\TH -I..\aten\..\third_party\catch\single_inclu
de -I..\aten\src\ATen\.. -Icaffe2\aten\src\ATen -I..\third_party\miniz-2.0.8 -I..\caffe2\core\nomnigraph\include -I..\c10\.. -I..\third_party\cpuinfo\include -I..\third_party\FP16\include -I..\cmake\..\
third_party\googletest\googlemock\include -I..\cmake\..\third_party\googletest\googletest\include -I..\third_party\protobuf\src -I"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\mkl
\include" -IV:\bin\scripting\python\conda\envs\pytorch\Library\include -I..\cmake\..\third_party\eigen -IV:\bin\scripting\python\conda\envs\pytorch\include -Iv:\bin\scripting\python\conda\envs\pytorch\l
ib\site-packages\numpy\core\include -I..\torch\include -I..\cmake\..\third_party\cub -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\include" -I..\caffe2 /DWIN32 /D_WINDOWS /GR  /w /EHa /MP 
/bigobj -openmp:experimental -DHAVE_AVX_CPU_DEFINITION -DHAVE_AVX2_CPU_DEFINITION /MD /O2 /Ob2  /w /EHa /MP /bigobj   -DCUDA_HAS_FP16=1 -DUSE_GCC_GET_CPUID -DUSE_AVX -DUSE_AVX2 -DTH_HAVE_THREAD /Z7 /EHa
 /DNOMINMAX /wd4267 /wd4251 /wd4522 /wd4838 /wd4305 /wd4244 /wd4190 /wd4101 /wd4996 /wd4275 /bigobj -O2 -DCAFFE2_BUILD_MAIN_LIB -DONNX_BUILD_MAIN_LIB -std:c++14 /showIncludes /Focaffe2\CMakeFiles\torch_
cpu.dir\core\blob_serialization.cc.obj /Fdcaffe2\CMakeFiles\torch_cpu.dir\ /FS -c ..\caffe2\core\blob_serialization.cc                                                                                    
V:\src\git\pytorch\src\pytorch\caffe2/core/context_base.h(92): error C2338: CopyToCPU requires fundamental types                                                                                          
..\caffe2\core\blob_serialization.cc(602): note: see reference to function template instantiation 'void at::BaseContext::CopyToCPU&lt;c10::Half&gt;(size_t,const T *,T *)' being compiled                       
        with                                                                                                                                                                                              
        [                                                                                                                                                                                                 
            T=c10::Half                                                                                                                                                                                   
        ]                                                                                                                                                                                                 
[102/995] Building CXX object caffe2\CMakeFiles\torch_cpu.dir\opt\onnxifi_op.cc.obj                                                                                                                       
ninja: build stopped: subcommand failed.                                                                                                                                                                  
Traceback (most recent call last):                                                                                                                                                                        
  File "setup.py", line 755, in &lt;module&gt;                                                                                                                                                                  
    build_deps()                                                                                                                                                                                          
  File "setup.py", line 316, in build_deps                                                                                                                                                                
    cmake=cmake)                                                                                                                                                                                          
  File "v:\src\git\pytorch\src\pytorch\tools\build_pytorch_libs.py", line 62, in build_caffe2                                                                                                             
    cmake.build(my_env)                                                                                                                                                                                   
  File "v:\src\git\pytorch\src\pytorch\tools\setup_helpers\cmake.py", line 337, in build                                                                                                                  
    self.run(build_args, my_env)                                                                                                                                                                          
  File "v:\src\git\pytorch\src\pytorch\tools\setup_helpers\cmake.py", line 141, in run                                                                                                                    
    check_call(command, cwd=self.build_dir, env=env)                                                                                                                                                      
  File "v:\bin\scripting\python\conda\envs\pytorch\lib\subprocess.py", line 347, in check_call                                                                                                            
    raise CalledProcessError(retcode, cmd)                                                                                                                                                                
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'install', '--config', 'Release', '--', '-j', '8']' returned non-zero exit status 1.
```                                       `


cc @peterjc123
</code></pre></div>