Getting C1001 Internal compiler error when building pytorch on windows

hello everyone.
Is building Pytorch on windows using visual studio 2019 supported?

OK, This is what I have done to build pytorch on windows. Using Visual Studio 2019 enterprise (16.7.2) :

git clone --branch v1.6.0 https://github.com/pytorch/pytorch.git pytorch-1.6.0
cd pytorch-1.6.0
git submodule update --init --recursive
set CUDAHOSTCXX=
set DISTUTILS_USE_SDK=1
for /f "usebackq tokens=*" %i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -version [15^,16^) -products * -latest -property installationPath`) do call "%i\VC\Auxiliary\Build\vcvarsall.bat" x64 -vcvars_ver=14.27
python setup.py build --cmake-only
cmake-gui

and this is what I did afterward:

I managed to open the visual studio and nearly build everything. but out of 46 targets, 11 failed with these errors.
I dont have any cuda installed and I’m using the cpu version.
Here are the errros I get:
build outout:

1>------ Build started: Project: defs.bzl, Configuration: Release x64 ------
2>------ Build started: Project: ATEN_CPU_FILES_GEN_TARGET, Configuration: Release x64 ------
3>------ Build started: Project: dnnl_cpu, Configuration: Release x64 ------
4>------ Build started: Project: generate-torch-sources, Configuration: Release x64 ------
5>------ Build started: Project: python_copy_files, Configuration: Release x64 ------
6>------ Build started: Project: gen_onnx_proto, Configuration: Release x64 ------
4>Generating ../../torch/csrc/autograd/generated/Functions.cpp, ../../torch/csrc/jit/generated/generated_unboxing_wrappers_0.cpp, ../../torch/csrc/jit/generated/generated_unboxing_wrappers_1.cpp, ../../torch/csrc/jit/generated/generated_unboxing_wrappers_2.cpp, ../../torch/csrc/autograd/generated/VariableType_0.cpp, ../../torch/csrc/autograd/generated/VariableType_1.cpp, ../../torch/csrc/autograd/generated/VariableType_2.cpp, ../../torch/csrc/autograd/generated/VariableType_3.cpp, ../../torch/csrc/autograd/generated/VariableType_4.cpp, ../../torch/csrc/autograd/generated/ProfiledType_0.cpp, ../../torch/csrc/autograd/generated/ProfiledType_1.cpp, ../../torch/csrc/autograd/generated/ProfiledType_2.cpp, ../../torch/csrc/autograd/generated/ProfiledType_3.cpp, ../../torch/csrc/autograd/generated/ProfiledType_4.cpp, ../../torch/csrc/autograd/generated/TraceType_0.cpp, ../../torch/csrc/autograd/generated/TraceType_1.cpp, ../../torch/csrc/autograd/generated/TraceType_2.cpp, ../../torch/csrc/autograd/generated/TraceType_3.cpp, ../../torch/csrc/autograd/generated/TraceType_4.cpp, ../../torch/csrc/autograd/generated/Functions.h, ../../torch/csrc/autograd/generated/variable_factories.h, ../../torch/csrc/autograd/generated/VariableType.h, ../../torch/csrc/autograd/generated/python_functions.cpp, ../../torch/csrc/autograd/generated/python_variable_methods.cpp, ../../torch/csrc/autograd/generated/python_torch_functions.cpp, ../../torch/csrc/autograd/generated/python_nn_functions.cpp, ../../torch/csrc/autograd/generated/python_functions.h
7>------ Build started: Project: __aten_op_header_gen, Configuration: Release x64 ------
8>------ Build started: Project: torch_python_stubs, Configuration: Release x64 ------
3>cl : command line warning D9025: overriding '/W1' with '/w'
3>cl : command line warning D9025: overriding '/W1' with '/w'
3>cpu_concat.cpp
3>cl : command line warning D9025: overriding '/W1' with '/w'
3>cl : command line warning D9025: overriding '/W1' with '/w'
3>cpu_layer_normalization_list.cpp
3>cpu_shuffle_list.cpp
3>cl : command line warning D9025: overriding '/W1' with '/w'
3>gemm_convolution_utils.cpp
3>cl : command line warning D9025: overriding '/W1' with '/w'
3>cl : command line warning D9025: overriding '/W1' with '/w'
3>ref_convolution.cpp
3>ref_deconvolution.cpp
3>cl : command line warning D9025: overriding '/W1' with '/w'
3>ref_eltwise.cpp
3>cl : command line warning D9025: overriding '/W1' with '/w'
3>ref_inner_product.cpp
3>ref_layer_normalization.cpp
3>ref_lrn.cpp
3>ref_pooling.cpp
3>ref_resampling.cpp
3>ref_shuffle.cpp
3>ref_softmax.cpp
3>D:\Codes\pytorch-1.6.0\third_party\ideep\mkl-dnn\src\cpu\gemm_convolution_utils.cpp(401): fatal error C1001: Internal compiler error.
3>(compiler file 'd:\agent\_work\7\s\src\vctools\Compiler\Utc\src\p2\main.c', line 195)
3> To work around this problem, try simplifying or changing the program near the locations listed above.
3>If possible please provide a repro here: https://developercommunity.visualstudio.com
3>Please choose the Technical Support command on the Visual C++
3> Help menu, or open the Technical Support help file for more information
3>  CL!RaiseException()+0x69
3>  CL!RaiseException()+0x69
3>  CL!CloseTypeServerPDB()+0x22e6b
3>  CL!CloseTypeServerPDB()+0xcd30a
3>simple_concat.cpp
3>simple_layer_normalization.cpp
3>simple_layer_normalization_kernels.cpp
3>simple_resampling.cpp
3>simple_sum.cpp
3>gemm_utils_f32.cpp
3>ref_gemm_f32.cpp
3>gemm.cpp
3>gemm_pack.cpp
3>ref_gemm_s8x8s32.cpp
3>simple_gemm_s8s8s32.cpp
3>cpu_matmul_list.cpp
3>cl : command line error D8040: error creating or communicating with child process
3>Done building project "dnnl_cpu.vcxproj" -- FAILED.
9>------ Build started: Project: dnnl, Configuration: Release x64 ------
9>Microsoft (R) Library Manager Version 14.27.29111.0
9>Copyright (C) Microsoft Corporation.  All rights reserved.
9>
9>"/OUT:D:\Codes\pytorch-1.6.0\build_dir\lib\Release\dnnl.lib" /NOLOGO /MACHINE:X64 /machine:x64 /ignore:4049 /ignore:4217 dnnl.dir\Release\version.res
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\batch_normalization.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\binary.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\concat.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\convolution.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\convolution_pd.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\deconvolution.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\dnnl_debug.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\dnnl_debug_autogenerated.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\eltwise.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\engine.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\inner_product.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\layer_normalization.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\lrn.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\matmul.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\memory.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\memory_debug.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\memory_desc_wrapper.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\memory_storage.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\memory_zero_pad.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\pooling.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\primitive.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\primitive_attr.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\primitive_cache.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\primitive_desc.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\primitive_exec_types.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\primitive_hashing.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\primitive_iterator.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\query.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\reorder.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\resampling.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\rnn.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\rw_mutex.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\scratchpad.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\scratchpad_debug.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\shuffle.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\softmax.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\stream.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\stream_attr.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\sum.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\utils.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\common\dnnl_common.dir\Release\verbose.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\cpu\dnnl_cpu.dir\Release\bfloat16.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\cpu\dnnl_cpu.dir\Release\cpu_batch_normalization_list.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\cpu\dnnl_cpu.dir\Release\cpu_batch_normalization_utils.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\cpu\dnnl_cpu.dir\Release\cpu_binary_list.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\cpu\dnnl_cpu.dir\Release\cpu_concat.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\cpu\dnnl_cpu.dir\Release\cpu_convolution_list.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\cpu\dnnl_cpu.dir\Release\cpu_deconvolution_list.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\cpu\dnnl_cpu.dir\Release\cpu_eltwise_list.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\cpu\dnnl_cpu.dir\Release\cpu_engine.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\cpu\dnnl_cpu.dir\Release\cpu_inner_product_list.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\cpu\dnnl_cpu.dir\Release\cpu_layer_normalization_list.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\cpu\dnnl_cpu.dir\Release\cpu_lrn_list.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\cpu\dnnl_cpu.dir\Release\cpu_pooling_list.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\cpu\dnnl_cpu.dir\Release\cpu_reorder.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\cpu\dnnl_cpu.dir\Release\cpu_resampling_list.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\cpu\dnnl_cpu.dir\Release\cpu_rnn_list.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\cpu\dnnl_cpu.dir\Release\cpu_shuffle_list.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\cpu\dnnl_cpu.dir\Release\cpu_softmax_list.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\cpu\dnnl_cpu.dir\Release\cpu_sum.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\cpu\dnnl_cpu.dir\Release\gemm_convolution.obj"
9>"D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\cpu\dnnl_cpu.dir\Release\gemm_convolution_utils.obj"
9>D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\cpu\dnnl_cpu.dir\Release\gemm_convolution_utils.obj : fatal error LNK1136: invalid or corrupt file
9>Done building project "dnnl.vcxproj" -- FAILED.
10>------ Build started: Project: torch_cpu, Configuration: Release x64 ------
11>------ Build started: Project: compat_libs, Configuration: Release x64 ------
11>Error copying file "D:/Codes/pytorch-1.6.0/build_dir/lib/Release/dnnl.lib" to "D:/Codes/pytorch-1.6.0/build_dir/lib/Release/mkldnn.lib".
11>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(234,5): error MSB6006: "cmd.exe" exited with code 1.
11>Done building project "compat_libs.vcxproj" -- FAILED.
10>Generating ../../torch/csrc/autograd/generated/Functions.cpp, ../../torch/csrc/jit/generated/generated_unboxing_wrappers_0.cpp, ../../torch/csrc/jit/generated/generated_unboxing_wrappers_1.cpp, ../../torch/csrc/jit/generated/generated_unboxing_wrappers_2.cpp, ../../torch/csrc/autograd/generated/VariableType_0.cpp, ../../torch/csrc/autograd/generated/VariableType_1.cpp, ../../torch/csrc/autograd/generated/VariableType_2.cpp, ../../torch/csrc/autograd/generated/VariableType_3.cpp, ../../torch/csrc/autograd/generated/VariableType_4.cpp, ../../torch/csrc/autograd/generated/ProfiledType_0.cpp, ../../torch/csrc/autograd/generated/ProfiledType_1.cpp, ../../torch/csrc/autograd/generated/ProfiledType_2.cpp, ../../torch/csrc/autograd/generated/ProfiledType_3.cpp, ../../torch/csrc/autograd/generated/ProfiledType_4.cpp, ../../torch/csrc/autograd/generated/TraceType_0.cpp, ../../torch/csrc/autograd/generated/TraceType_1.cpp, ../../torch/csrc/autograd/generated/TraceType_2.cpp, ../../torch/csrc/autograd/generated/TraceType_3.cpp, ../../torch/csrc/autograd/generated/TraceType_4.cpp, ../../torch/csrc/autograd/generated/Functions.h, ../../torch/csrc/autograd/generated/variable_factories.h, ../../torch/csrc/autograd/generated/VariableType.h, ../../torch/csrc/autograd/generated/python_functions.cpp, ../../torch/csrc/autograd/generated/python_variable_methods.cpp, ../../torch/csrc/autograd/generated/python_torch_functions.cpp, ../../torch/csrc/autograd/generated/python_nn_functions.cpp, ../../torch/csrc/autograd/generated/python_functions.h
4>Skipped writing torch/csrc\autograd\generated\python_functions.h
4>Skipped writing torch/csrc\autograd\generated\python_functions.cpp
4>Skipped writing torch/csrc\autograd\generated\python_variable_methods.cpp
4>Skipped writing torch/csrc\autograd\generated\python_torch_functions.cpp
4>Skipped writing torch/csrc\autograd\generated\python_nn_functions.cpp
4>Skipped writing torch/csrc\autograd\generated\VariableType.h
4>Skipped writing torch/csrc\autograd\generated\VariableType_0.cpp
4>Skipped writing torch/csrc\autograd\generated\ProfiledType_0.cpp
4>Skipped writing torch/csrc\autograd\generated\TraceType_0.cpp
4>Skipped writing torch/csrc\autograd\generated\VariableType_1.cpp
4>Skipped writing torch/csrc\autograd\generated\ProfiledType_1.cpp
4>Skipped writing torch/csrc\autograd\generated\TraceType_1.cpp
4>Skipped writing torch/csrc\autograd\generated\VariableType_2.cpp
4>Skipped writing torch/csrc\autograd\generated\ProfiledType_2.cpp
4>Skipped writing torch/csrc\autograd\generated\TraceType_2.cpp
4>Skipped writing torch/csrc\autograd\generated\VariableType_3.cpp
4>Skipped writing torch/csrc\autograd\generated\ProfiledType_3.cpp
4>Skipped writing torch/csrc\autograd\generated\TraceType_3.cpp
4>Skipped writing torch/csrc\autograd\generated\VariableType_4.cpp
4>Skipped writing torch/csrc\autograd\generated\ProfiledType_4.cpp
4>Skipped writing torch/csrc\autograd\generated\TraceType_4.cpp
4>Skipped writing torch/csrc\autograd\generated\VariableTypeEverything.cpp
4>Skipped writing torch/csrc\autograd\generated\ProfiledTypeEverything.cpp
4>Skipped writing torch/csrc\autograd\generated\TraceTypeEverything.cpp
4>Skipped writing torch/csrc\autograd\generated\RegistrationDeclarations.h
4>Skipped writing torch/csrc\autograd\generated\Functions.h
4>Skipped writing torch/csrc\autograd\generated\Functions.cpp
4>Skipped writing torch/csrc\autograd\generated\variable_factories.h
4>Skipped writing torch/csrc\jit\generated\generated_unboxing_wrappers_0.cpp
4>Skipped writing torch/csrc\jit\generated\generated_unboxing_wrappers_1.cpp
4>Skipped writing torch/csrc\jit\generated\generated_unboxing_wrappers_2.cpp
10>Skipped writing torch/csrc\autograd\generated\python_functions.h
10>Skipped writing torch/csrc\autograd\generated\python_functions.cpp
10>Skipped writing torch/csrc\autograd\generated\python_variable_methods.cpp
10>Skipped writing torch/csrc\autograd\generated\python_torch_functions.cpp
10>Skipped writing torch/csrc\autograd\generated\python_nn_functions.cpp
10>Skipped writing torch/csrc\autograd\generated\VariableType.h
10>Skipped writing torch/csrc\autograd\generated\VariableType_0.cpp
10>Skipped writing torch/csrc\autograd\generated\ProfiledType_0.cpp
10>Skipped writing torch/csrc\autograd\generated\TraceType_0.cpp
10>Skipped writing torch/csrc\autograd\generated\VariableType_1.cpp
10>Skipped writing torch/csrc\autograd\generated\ProfiledType_1.cpp
10>Skipped writing torch/csrc\autograd\generated\TraceType_1.cpp
10>Skipped writing torch/csrc\autograd\generated\VariableType_2.cpp
10>Skipped writing torch/csrc\autograd\generated\ProfiledType_2.cpp
10>Skipped writing torch/csrc\autograd\generated\TraceType_2.cpp
10>Skipped writing torch/csrc\autograd\generated\VariableType_3.cpp
10>Skipped writing torch/csrc\autograd\generated\ProfiledType_3.cpp
10>Skipped writing torch/csrc\autograd\generated\TraceType_3.cpp
10>Skipped writing torch/csrc\autograd\generated\VariableType_4.cpp
10>Skipped writing torch/csrc\autograd\generated\ProfiledType_4.cpp
10>Skipped writing torch/csrc\autograd\generated\TraceType_4.cpp
10>Skipped writing torch/csrc\autograd\generated\VariableTypeEverything.cpp
10>Skipped writing torch/csrc\autograd\generated\ProfiledTypeEverything.cpp
10>Skipped writing torch/csrc\autograd\generated\TraceTypeEverything.cpp
10>Skipped writing torch/csrc\autograd\generated\RegistrationDeclarations.h
10>Skipped writing torch/csrc\autograd\generated\Functions.h
10>Skipped writing torch/csrc\autograd\generated\Functions.cpp
10>Skipped writing torch/csrc\autograd\generated\variable_factories.h
10>Skipped writing torch/csrc\jit\generated\generated_unboxing_wrappers_0.cpp
10>Skipped writing torch/csrc\jit\generated\generated_unboxing_wrappers_1.cpp
10>Skipped writing torch/csrc\jit\generated\generated_unboxing_wrappers_2.cpp
10>LINK : fatal error LNK1181: cannot open input file '..\lib\Release\dnnl.lib'
10>Done building project "torch_cpu.vcxproj" -- FAILED.
12>------ Build started: Project: torch, Configuration: Release x64 ------
12>LINK : fatal error LNK1181: cannot open input file '..\lib\Release\torch_cpu.lib'
12>Done building project "torch.vcxproj" -- FAILED.
13>------ Build started: Project: caffe2_pybind11_state, Configuration: Release x64 ------
14>------ Build started: Project: shm, Configuration: Release x64 ------
15>------ Build started: Project: caffe2_observers, Configuration: Release x64 ------
16>------ Build started: Project: caffe2_detectron_ops, Configuration: Release x64 ------
15>LINK : fatal error LNK1181: cannot open input file '..\..\lib\Release\torch.lib'
15>Done building project "caffe2_observers.vcxproj" -- FAILED.
14>LINK : fatal error LNK1181: cannot open input file '..\..\..\..\lib\Release\torch.lib'
14>Done building project "shm.vcxproj" -- FAILED.
17>------ Build started: Project: torch_python, Configuration: Release x64 ------
18>------ Build started: Project: windows_python_copy_lib, Configuration: Release x64 ------
16>LINK : fatal error LNK1181: cannot open input file '..\..\lib\Release\torch.lib'
16>Done building project "caffe2_detectron_ops.vcxproj" -- FAILED.
18>Error copying file "D:/Codes/pytorch-1.6.0/build_dir/caffe2/python/Release/caffe2_pybind11_state.cp37-win_amd64.pyd" to "D:/Codes/pytorch-1.6.0/build_dir/caffe2/python".
18>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: The command "setlocal
18>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: "C:\Program Files\CMake\bin\cmake.exe" -E copy D:/Codes/pytorch-1.6.0/build_dir/caffe2/python/Release/caffe2_pybind11_state.cp37-win_amd64.pyd D:/Codes/pytorch-1.6.0/build_dir/caffe2/python
18>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd
18>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: :cmEnd
18>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
18>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: :cmErrorLevel
18>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: exit /b %1
18>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: :cmDone
18>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd
18>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: :VCEnd" exited with code 1.
18>Done building project "windows_python_copy_lib.vcxproj" -- FAILED.
17>LINK : fatal error LNK1181: cannot open input file '..\..\lib\Release\shm.lib'
17>Done building project "torch_python.vcxproj" -- FAILED.
========== Build: 7 succeeded, 11 failed, 28 up-to-date, 0 skipped ==========

Linker errrors:

Severity	Code	Description	Project	File	Line	Suppression State
Error	C1001	Internal compiler error.	dnnl_cpu	D:\Codes\pytorch-1.6.0\third_party\ideep\mkl-dnn\src\cpu\gemm_convolution_utils.cpp	401	
Error	D8040	error creating or communicating with child process	dnnl_cpu	D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\cpu\cl	1	
Error	LNK1136	invalid or corrupt file	dnnl	D:\Codes\pytorch-1.6.0\build_dir\third_party\ideep\mkl-dnn\src\cpu\dnnl_cpu.dir\Release\gemm_convolution_utils.obj	1	
Error	MSB6006	"cmd.exe" exited with code 1.	compat_libs	C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets	234	
Error	LNK1181	cannot open input file '..\lib\Release\dnnl.lib'	torch_cpu	D:\Codes\pytorch-1.6.0\build_dir\caffe2\LINK	1	
Error	LNK1181	cannot open input file '..\lib\Release\torch_cpu.lib'	torch	D:\Codes\pytorch-1.6.0\build_dir\caffe2\LINK	1	
Error	LNK1181	cannot open input file '..\..\lib\Release\torch.lib'	caffe2_observers	D:\Codes\pytorch-1.6.0\build_dir\modules\observers\LINK	1	
Error	LNK1181	cannot open input file '..\..\..\..\lib\Release\torch.lib'	shm	D:\Codes\pytorch-1.6.0\build_dir\caffe2\torch\lib\libshm_windows\LINK	1	
Error	LNK1181	cannot open input file '..\..\lib\Release\torch.lib'	caffe2_detectron_ops	D:\Codes\pytorch-1.6.0\build_dir\modules\detectron\LINK	1	
Error	MSB3073	The command "setlocal
"C:\Program Files\CMake\bin\cmake.exe" -E copy D:/Codes/pytorch-1.6.0/build_dir/caffe2/python/Release/caffe2_pybind11_state.cp37-win_amd64.pyd D:/Codes/pytorch-1.6.0/build_dir/caffe2/python
if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd
:VCEnd" exited with code 1.	windows_python_copy_lib	C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets	149	
Error	LNK1181	cannot open input file '..\..\lib\Release\shm.lib'	torch_python	D:\Codes\pytorch-1.6.0\build_dir\caffe2\torch\LINK	1	

What am I missing here?
please note that this is the default, and I have not yet changed to MT yet. its all MD by default.
any help is greatly apprecaited.
@peterjc123

This is related to this : https://github.com/oneapi-src/oneDNN/issues/812
Also it seems the change is a one liner .i.e just change auto zero_val = (data_t)0; to const data_t zero_val = 0; in src/cpu/gemm_convolution_utils.cpp and thats all.
ref

Hi,

We updated our version of oneDNN recently and this fix should have been pulled in. Do you still see this problem with the current master branch?

Hi,
Yes I have seen the workaround and it indeed fixes the issue. I have only used this with 1.6.0 not sure if there is any issues with the master branch though I believe the master should be fine too if the fix is already merged.

@albanD I built the latest master and all is fine as far as the building process goes. just wanted to update you on this once again

1 Like

BTW, we usually use python tools\build_libtorch.py when building LibTorch. If you need /MT, please set BUILD_SHARED_LIBS to OFF and then start the build.

1 Like

Thanks a lot really appreciate it. I surely will give that a try and if something turns up I’ll report back.

I could build the libs both MT and MD using the normal cmake way(setup.py build --cmake-only). but
I’m getting lots of linker errors when I run that script like this :

cd tools
set BUILD_SHARED_LIBS=OFF
for /f "usebackq tokens=*" %i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -version [15^,16^) -products * -latest -property installationPath`) do call "%i\VC\Auxiliary\Build\vcvarsall.bat" x64 -vcvars_ver=14.27
python build_libtorch.py

linker errors :

torch_cpu.lib(conv_dnnlowp_op.cc.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl fbgemm::PackWeightMatrixForGConv<signed char,int,3>::PackWeightMatrixForGConv<signed char,int,3>(enum fbgemm::matrix_op_t,struct fbgemm::conv_param_t<3> const &,signed char const *,signed char *)" (__imp_??0?$PackWeightMatrixForGConv@CH$02@fbgemm@@QEAA@W4matrix_op_t@1@AEBU?$conv_param_t@$02@1@PEBCPEAC@Z)
torch_cpu.lib(fbgemm_pack_op.cc.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl fbgemm::PackWeightMatrixForGConv<signed char,int,3>::~PackWeightMatrixForGConv<signed char,int,3>(void)" (__imp_??1?$PackWeightMatrixForGConv@CH$02@fbgemm@@QEAA@XZ) referenced in function "public: __cdecl std::_Temporary_owner<class fbgemm::PackWeightMatrixForGConv<signed char,int,3> >::~_Temporary_owner<class fbgemm::PackWeightMatrixForGConv<signed char,int,3> >(void)" (??1?$_Temporary_owner@V?$PackWeightMatrixForGConv@CH$02@fbgemm@@@std@@QEAA@XZ)
torch_cpu.lib(conv_dnnlowp_op.cc.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl fbgemm::PackWeightMatrixForGConv<signed char,int,3>::~PackWeightMatrixForGConv<signed char,int,3>(void)" (__imp_??1?$PackWeightMatrixForGConv@CH$02@fbgemm@@QEAA@XZ)
torch_cpu.lib(dnnlowp.cc.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl fbgemm::ChooseRequantizationMultiplier(float,int *,int *,int)" (__imp_?ChooseRequantizationMultiplier@fbgemm@@YAXMPEAH0H@Z) referenced in function "public: struct fbgemm::RequantizationParams __cdecl dnnlowp::QuantizationFactory::ChooseRequantizationMultiplier(float,struct fbgemm::TensorQuantizationParams)const " (?ChooseRequantizationMultiplier@QuantizationFactory@dnnlowp@@QEBA?AURequantizationParams@fbgemm@@MUTensorQuantizationParams@4@@Z)
torch_cpu.lib(conv_dnnlowp_op.cc.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl fbgemm::row_offsets_u8acc32_ref(int,int,int,unsigned char const *,int *)" (__imp_?row_offsets_u8acc32_ref@fbgemm@@YAXHHHPEBEPEAH@Z) referenced in function "protected: void __cdecl caffe2::ConvDNNLowPOp<unsigned char,1>::RunOnDeviceEpilogueNHWC_$omp$1(unsigned char const *,int *)" (?RunOnDeviceEpilogueNHWC_$omp$1@?$ConvDNNLowPOp@E$00@caffe2@@IEAAXPEBEPEAH@Z)
torch_cpu.lib(conv_dnnlowp_op.cc.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl fbgemm::depthwise_3x3x3_per_channel_quantization_pad_1<int>(int,int,int,int,int,int,int,int,int,unsigned char const *,int const *,class fbgemm::PackedDepthWiseConvMatrix const &,float const *,int,unsigned char *,int const *,int const *,bool,float const *,int,int)" (__imp_??$depthwise_3x3x3_per_channel_quantization_pad_1@H@fbgemm@@YAXHHHHHHHHHPEBEPEBHAEBVPackedDepthWiseConvMatrix@0@PEBMHPEAE11_N3HH@Z) referenced in function "private: void __cdecl caffe2::ConvDNNLowPOp<unsigned char,1>::ConvNHWCCore_$omp$1(unsigned char const *,class std::vector<int,class std::allocator<int> > *)" (?ConvNHWCCore_$omp$1@?$ConvDNNLowPOp@E$00@caffe2@@AEAAXPEBEPEAV?$vector@HV?$allocator@H@std@@@std@@@Z)
torch_cpu.lib(conv_dnnlowp_op.cc.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl fbgemm::depthwise_3x3x3_pad_1<int>(int,int,int,int,int,int,int,int,int,unsigned char const *,int,class fbgemm::PackedDepthWiseConvMatrix const &,float,int,unsigned char *,int const *,int const *,bool,float,int,int)" (__imp_??$depthwise_3x3x3_pad_1@H@fbgemm@@YAXHHHHHHHHHPEBEHAEBVPackedDepthWiseConvMatrix@0@MHPEAEPEBH3_NMHH@Z) referenced in function "private: void __cdecl caffe2::ConvDNNLowPOp<unsigned char,1>::ConvNHWCCore_$omp$1(unsigned char const *,class std::vector<int,class std::allocator<int> > *)" (?ConvNHWCCore_$omp$1@?$ConvDNNLowPOp@E$00@caffe2@@AEAAXPEBEPEAV?$vector@HV?$allocator@H@std@@@std@@@Z)
torch_cpu.lib(conv_dnnlowp_op.cc.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl fbgemm::depthwise_2d_per_channel_quantization_same_pad<int>(int,int,int,int,int,int,int,unsigned char const *,int const *,class fbgemm::PackedDepthWiseConvMatrix const &,float const *,int,unsigned char *,int const *,int const *,bool,float const *,int,int)" (__imp_??$depthwise_2d_per_channel_quantization_same_pad@H@fbgemm@@YAXHHHHHHHPEBEPEBHAEBVPackedDepthWiseConvMatrix@0@PEBMHPEAE11_N3HH@Z) referenced in function "private: void __cdecl caffe2::ConvDNNLowPOp<unsigned char,1>::ConvNHWCCore_$omp$2(unsigned char const *,class std::vector<int,class std::allocator<int> > *)" (?ConvNHWCCore_$omp$2@?$ConvDNNLowPOp@E$00@caffe2@@AEAAXPEBEPEAV?$vector@HV?$allocator@H@std@@@std@@@Z)
torch_cpu.lib(conv_dnnlowp_op.cc.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl fbgemm::depthwise_2d_same_pad<int>(int,int,int,int,int,int,int,unsigned char const *,int,class fbgemm::PackedDepthWiseConvMatrix const &,float,int,unsigned char *,int const *,int const *,bool,float,int,int)" (__imp_??$depthwise_2d_same_pad@H@fbgemm@@YAXHHHHHHHPEBEHAEBVPackedDepthWiseConvMatrix@0@MHPEAEPEBH3_NMHH@Z) referenced in function "private: void __cdecl caffe2::ConvDNNLowPOp<unsigned char,1>::ConvNHWCCore_$omp$2(unsigned char const *,class std::vector<int,class std::allocator<int> > *)" (?ConvNHWCCore_$omp$2@?$ConvDNNLowPOp@E$00@caffe2@@AEAAXPEBEPEAV?$vector@HV?$allocator@H@std@@@std@@@Z)
....

I couldnt set DISTUTILS_USE_SDK=1 as doing so would result in the following error :

D:\Codes\pytorch-1.6.0\tools>python build_libtorch.py
cmake -GNinja -DBUILD_PYTHON=False -DBUILD_SHARED_LIBS=OFF -DBUILD_TEST=True -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=D:\Codes\pytorch-1.6.0\torch -DCMAKE_PREFIX_PATH=C:\Users\User\Anaconda3\Lib\site-packages -DNUMPY_INCLUDE_DIR=C:\Users\User\Anaconda3\Lib\site-packages\numpy\core\include -DPYTHON_EXECUTABLE=C:\Users\User\Anaconda3\python.exe -DPYTHON_INCLUDE_DIR=C:\Users\User\Anaconda3\include -DUSE_NUMPY=True D:\Codes\pytorch-1.6.0
CMake Error at C:/Users/User/Anaconda3/Library/share/cmake-3.17/Modules/CMakeDetermineCXXCompiler.cmake:48 (message):
  Could not find compiler set in environment variable CXX:

  cl.

Call Stack (most recent call first):
  CMakeLists.txt:23 (project)


CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "D:/Codes/pytorch-1.6.0/tools/build/CMakeFiles/CMakeOutput.log".
See also "D:/Codes/pytorch-1.6.0/tools/build/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
  File "build_libtorch.py", line 23, in <module>
    rerun_cmake=True, cmake_only=False, cmake=CMake())
  File "D:\Codes\pytorch-1.6.0\tools\build_pytorch_libs.py", line 59, in build_caffe2
    rerun_cmake)
  File "D:\Codes\pytorch-1.6.0\tools\setup_helpers\cmake.py", line 329, in generate
    self.run(args, env=my_env)
  File "D:\Codes\pytorch-1.6.0\tools\setup_helpers\cmake.py", line 141, in run
    check_call(command, cwd=self.build_dir, env=env)
  File "C:\Users\User\Anaconda3\Lib\subprocess.py", line 347, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '-GNinja', '-DBUILD_PYTHON=False', '-DBUILD_SHARED_LIBS=OFF', '-DBUILD_TEST=True', '-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_INSTALL_PREFIX=D:\\Codes\\pytorch-1.6.0\\torch', '-DCMAKE_PREFIX_PATH=C:\\Users\\User\\Anaconda3\\Lib\\site-packages', '-DNUMPY_INCLUDE_DIR=C:\\Users\\User\\Anaconda3\\Lib\\site-packages\\numpy\\core\\include', '-DPYTHON_EXECUTABLE=C:\\Users\\User\\Anaconda3\\python.exe', '-DPYTHON_INCLUDE_DIR=C:\\Users\\User\\Anaconda3\\include', '-DUSE_NUMPY=True', 'D:\\Codes\\pytorch-1.6.0']' returned non-zero exit status 1.

what am I missing here?
could you kindly point that out?

How did you build for /MT?

How you activated the VC shell more than once?

Let’s continue with your first code block. Would you please try the following commands?

set PYTORCH_ROOT=C:\pytorch

cd %PYTORCH_ROOT%
set BUILD_SHARED_LIBS=OFF
for /f "usebackq tokens=*" %i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -version [15^,16^) -products * -latest -property installationPath`) do call "%i\VC\Auxiliary\Build\vcvarsall.bat" x64 -vcvars_ver=14.27
set CL=/DFBGEMM_STATIC#1
python tools\build_libtorch.py
1 Like

Thanks a lot really appreciate your time and kind help.

How did you build for /MT ?

Concerning how I built the \MT . Since I could successfully create a cmake project and then a visual studio project using what I mentioned in post #2 , I went on to each single project, right clicked on each of them, went to properties, C/C++ -> Code Generation -> Runtime Library and flipped the option from MD to MT! and it successfully built the libs. although the Python_sth failed, but the main libs that I were after were successfully built.

The weird thing though was that, there were no .dlls despite the fact that I only changed the library runtime option and everything else was intact. I only got .lib files plus .exp files. I used them to successfully link my application , however for execution it needed the dll part (c10.dll for example) which shamelessly I used the prebuilt ones from Pytorch which I believe are built as MD!
I didn’t face any issues though, the app seemed to be running just fine. the lib version (static build) was fine though.
So I wanted to know is this normal or did I just messed something up ? (I have a gut feeling I did!)

How you activated the VC shell more than once?
I’m not sure, I didn’t do anything special, maybe my repeated tries resulted in that?

Anyway, your proposed change seems to be working and its being compiled now. I’ll report back how it goes.

Update:
Its finished successfully and created 247 targets!
Something to note though why is torch_cpu.lib 2.05 GB!? this is huge! :

wouldn’t this be an issue? specially in ram consumption? This is not related to libtorch anymore, but I’d really appreciate an explanation on this if possible. I know statically linking allows for only the needed parts to be loaded into ram, but this huge amount kind of scares me that lots of stuff is going to end up there (possibly as duplicates?) when I built using my first attempt, my torch_cpu.lib was around 10/20 MBs if I’m not mistaken. how come this is 2GB! is it because this is built statically and I built it dynamically? (in that case, why did I not have any .dll files accompaning the lib files like usual?)

I guess the way you try to build for /MT only enables some of the part into /MT. Because some of the flags relies on BUILD_SHARED_LIBS.

Yes, in my memory it is just that big. That’s definitely an issue. But we don’t have time to optimize it. Generally speaking, static libs will be larger than the dynamic libs because all dependencies will be added to the static lib when linking (since /WHOLEARCHIVE is used).

1 Like

Thanks a lot really apprecaite your kind help on this. I’m really grateful.

Excuse me, but I noticed lots of

info C5002: Omp simd loop not vectorized due to reason ‘1200’

during compilation process. is this normal? or is it another bug from visual studio 2019? Do you see this in your builds as well?

I also noticed after statically linking with the newly built libs, upon exeuting the executable, it requires c10.dll and torch_cpu.dll :


what am I missing here? it shouldnt be needing the dlls !

Nope, it is not a bug. It is just VS adds support for the #pragma omp simd clauses in 2019. But they have strict requirements so they cannot be automatically vectorized. In VS2017, they are not even recognized.

It shouldn’t be. Could you please show me how you linked against those libs?

Thanks a lot. do you need to see how my test application is linked to these libs? i.e. how the VS project properties is configured?

Yes, please. [20 characters]

1 Like

OK, I noticed I was linking against the previous build of mine. I changed the libs forlder to the one created by the method you previously told and now I’m getting linker errors. anyway here is the whole config:
pytorch_build3

couple of linker errors I get now:

Severity	Code	Description	Project	File	Line	Suppression State
Error	LNK2001	unresolved external symbol "__declspec(dllimport) class at::Tensor __cdecl at::clamp(class at::Tensor const &,class c10::optional<class c10::Scalar>,class c10::optional<class c10::Scalar>)" (__imp_?clamp@at@@YA?AVTensor@1@AEBV21@V?$optional@VScalar@c10@@@c10@@1@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) class at::Context & __cdecl at::globalContext(void)" (__imp_?globalContext@at@@YAAEAVContext@1@XZ)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) class at::Tensor __cdecl at::acos(class at::Tensor const &)" (__imp_?acos@at@@YA?AVTensor@1@AEBV21@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) class at::Tensor __cdecl at::dot(class at::Tensor const &,class at::Tensor const &)" (__imp_?dot@at@@YA?AVTensor@1@AEBV21@0@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) class at::Tensor __cdecl at::squeeze(class at::Tensor const &,__int64)" (__imp_?squeeze@at@@YA?AVTensor@1@AEBV21@_J@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) class std::vector<__int64,class std::allocator<__int64> > __cdecl at::detail::defaultStrides(class c10::ArrayRef<__int64>)" (__imp_?defaultStrides@detail@at@@YA?AV?$vector@_JV?$allocator@_J@std@@@std@@V?$ArrayRef@_J@c10@@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) unsigned __int64 __cdecl at::detail::computeStorageNbytes(class c10::ArrayRef<__int64>,class c10::ArrayRef<__int64>,unsigned __int64)" (__imp_?computeStorageNbytes@detail@at@@YA_KV?$ArrayRef@_J@c10@@0_K@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) class at::Tensor __cdecl at::scalar_tensor(class c10::Scalar,struct c10::TensorOptions const &)" (__imp_?scalar_tensor@at@@YA?AVTensor@1@VScalar@c10@@AEBUTensorOptions@4@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) class at::Tensor __cdecl at::frobenius_norm(class at::Tensor const &)" (__imp_?frobenius_norm@at@@YA?AVTensor@1@AEBV21@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) class at::Tensor __cdecl at::native::tensor(class c10::ArrayRef<float>,struct c10::TensorOptions const &)" (__imp_?tensor@native@at@@YA?AVTensor@2@V?$ArrayRef@M@c10@@AEBUTensorOptions@5@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) class at::Tensor __cdecl at::empty(class c10::ArrayRef<__int64>,struct c10::TensorOptions const &,class c10::optional<enum c10::MemoryFormat>)" (__imp_?empty@at@@YA?AVTensor@1@V?$ArrayRef@_J@c10@@AEBUTensorOptions@4@V?$optional@W4MemoryFormat@c10@@@4@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl c10::operator<<(class std::basic_ostream<char,struct std::char_traits<char> > &,struct c10::Half const &)" (__imp_??6c10@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AEAV12@AEBUHalf@0@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) struct torch::jit::Module __cdecl torch::jit::load(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class c10::optional<struct c10::Device>,class std::unordered_map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::hash<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,struct std::equal_to<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > &)" (__imp_?load@jit@torch@@YA?AUModule@12@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$optional@UDevice@c10@@@c10@@AEAV?$unordered_map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@U?$hash@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@U?$equal_to@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@5@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: void __cdecl torch::serialize::InputArchive::load_from(class std::basic_istream<char,struct std::char_traits<char> > &,class c10::optional<struct c10::Device>)" (__imp_?load_from@InputArchive@serialize@torch@@QEAAXAEAV?$basic_istream@DU?$char_traits@D@std@@@std@@V?$optional@UDevice@c10@@@c10@@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: void __cdecl torch::serialize::InputArchive::read(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class at::Tensor &,bool)" (__imp_?read@InputArchive@serialize@torch@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAVTensor@at@@_N@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: __cdecl torch::serialize::InputArchive::InputArchive(void)" (__imp_??0InputArchive@serialize@torch@@QEAA@XZ)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: void __cdecl torch::serialize::OutputArchive::save_to(class std::basic_ostream<char,struct std::char_traits<char> > &)" (__imp_?save_to@OutputArchive@serialize@torch@@QEAAXAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: void __cdecl torch::serialize::OutputArchive::write(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class at::Tensor const &,bool)" (__imp_?write@OutputArchive@serialize@torch@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBVTensor@at@@_N@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: __cdecl torch::serialize::OutputArchive::OutputArchive(class std::shared_ptr<struct torch::jit::CompilationUnit>)" (__imp_??0OutputArchive@serialize@torch@@QEAA@V?$shared_ptr@UCompilationUnit@jit@torch@@@std@@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: __cdecl torch::jit::CompilationUnit::CompilationUnit(void)" (__imp_??0CompilationUnit@jit@torch@@QEAA@XZ)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: __cdecl torch::jit::CompilationUnit::~CompilationUnit(void)" (__imp_??1CompilationUnit@jit@torch@@QEAA@XZ)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: __cdecl torch::serialize::InputArchive::~InputArchive(void)" (__imp_??1InputArchive@serialize@torch@@QEAA@XZ)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: __cdecl torch::serialize::OutputArchive::~OutputArchive(void)" (__imp_??1OutputArchive@serialize@torch@@QEAA@XZ)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: struct torch::jit::Module & __cdecl torch::jit::Module::operator=(struct torch::jit::Module const &)" (__imp_??4Module@jit@torch@@QEAAAEAU012@AEBU012@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: struct c10::IValue __cdecl torch::jit::Module::forward(class std::vector<struct c10::IValue,class std::allocator<struct c10::IValue> >)" (__imp_?forward@Module@jit@torch@@QEAA?AUIValue@c10@@V?$vector@UIValue@c10@@V?$allocator@UIValue@c10@@@std@@@std@@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: __cdecl torch::jit::Module::~Module(void)" (__imp_??1Module@jit@torch@@QEAA@XZ)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: __cdecl torch::jit::Module::Module(void)" (__imp_??0Module@jit@torch@@QEAA@XZ)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: virtual __cdecl torch::autograd::AutogradMeta::~AutogradMeta(void)" (__imp_??1AutogradMeta@autograd@torch@@UEAA@XZ)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: __cdecl torch::autograd::AutogradMeta::AutogradMeta(struct c10::TensorImpl *,bool,struct torch::autograd::Edge)" (__imp_??0AutogradMeta@autograd@torch@@QEAA@PEAUTensorImpl@c10@@_NUEdge@12@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: virtual class at::Tensor const & __cdecl torch::autograd::AutogradMeta::grad(void)const " (__imp_?grad@AutogradMeta@autograd@torch@@UEBAAEBVTensor@at@@XZ)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: virtual class at::Tensor & __cdecl torch::autograd::AutogradMeta::grad(void)" (__imp_?grad@AutogradMeta@autograd@torch@@UEAAAEAVTensor@at@@XZ)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: virtual bool __cdecl torch::autograd::AutogradMeta::requires_grad(void)const " (__imp_?requires_grad@AutogradMeta@autograd@torch@@UEBA_NXZ)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: virtual void __cdecl torch::autograd::AutogradMeta::set_requires_grad(bool,struct c10::TensorImpl *)" (__imp_?set_requires_grad@AutogradMeta@autograd@torch@@UEAAX_NPEAUTensorImpl@c10@@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: __cdecl at::NoGradGuard::~NoGradGuard(void)" (__imp_??1NoGradGuard@at@@QEAA@XZ)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: __cdecl at::NoGradGuard::NoGradGuard(void)" (__imp_??0NoGradGuard@at@@QEAA@XZ)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: struct c10::StrongTypePtr & __cdecl c10::StrongTypePtr::operator=(struct c10::StrongTypePtr &&)" (__imp_??4StrongTypePtr@c10@@QEAAAEAU01@$$QEAU01@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: struct c10::StrongTypePtr & __cdecl c10::StrongTypePtr::operator=(struct c10::StrongTypePtr const &)" (__imp_??4StrongTypePtr@c10@@QEAAAEAU01@AEBU01@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: __cdecl c10::StrongTypePtr::StrongTypePtr(struct c10::StrongTypePtr const &)" (__imp_??0StrongTypePtr@c10@@QEAA@AEBU01@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: __cdecl c10::ivalue::Future::FutureError::FutureError(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &&)" (__imp_??0FutureError@Future@ivalue@c10@@QEAA@$$QEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: class at::Tensor __cdecl at::Tensor::operator[](__int64)const " (__imp_??ATensor@at@@QEBA?AV01@_J@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: __cdecl at::AutoNonVariableTypeMode::~AutoNonVariableTypeMode(void)" (__imp_??1AutoNonVariableTypeMode@at@@QEAA@XZ)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: struct c10::Device __cdecl at::Context::getDeviceFromPtr(void *,enum c10::DeviceType)" (__imp_?getDeviceFromPtr@Context@at@@QEAA?AUDevice@c10@@PEAXW4DeviceType@4@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: __cdecl at::AutoNonVariableTypeMode::AutoNonVariableTypeMode(bool)" (__imp_??0AutoNonVariableTypeMode@at@@QEAA@_N@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: class at::Tensor & __cdecl at::Tensor::operator=(class at::Tensor const &)& " (__imp_??4Tensor@at@@QEGAAAEAV01@AEBV01@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: class c10::intrusive_ptr<struct c10::TensorImpl,struct c10::UndefinedTensorImpl> const & __cdecl at::Tensor::getIntrusivePtr(void)const " (__imp_?getIntrusivePtr@Tensor@at@@QEBAAEBV?$intrusive_ptr@UTensorImpl@c10@@UUndefinedTensorImpl@2@@c10@@XZ)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: bool __cdecl c10::TensorImpl::unique_version(void)const " (__imp_?unique_version@TensorImpl@c10@@QEBA_NXZ)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: bool __cdecl c10::TensorOptions::requires_grad(void)const " (__imp_?requires_grad@TensorOptions@c10@@QEBA_NXZ)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: bool __cdecl c10::TensorOptions::has_dtype(void)const " (__imp_?has_dtype@TensorOptions@c10@@QEBA_NXZ)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: __cdecl c10::TensorOptions::TensorOptions(enum c10::ScalarType)" (__imp_??0TensorOptions@c10@@QEAA@W4ScalarType@1@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: __cdecl c10::Storage::Storage(struct c10::Storage::use_byte_size_t,unsigned __int64,class c10::DataPtr,struct c10::Allocator *,bool)" (__imp_??0Storage@c10@@QEAA@Uuse_byte_size_t@01@_KVDataPtr@1@PEAUAllocator@1@_N@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) protected: class c10::intrusive_ptr_target & __cdecl c10::intrusive_ptr_target::operator=(class c10::intrusive_ptr_target const &)" (__imp_??4intrusive_ptr_target@c10@@IEAAAEAV01@AEBV01@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) protected: __cdecl c10::intrusive_ptr_target::intrusive_ptr_target(class c10::intrusive_ptr_target const &)" (__imp_??0intrusive_ptr_target@c10@@IEAA@AEBV01@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) protected: class c10::intrusive_ptr_target & __cdecl c10::intrusive_ptr_target::operator=(class c10::intrusive_ptr_target &&)" (__imp_??4intrusive_ptr_target@c10@@IEAAAEAV01@$$QEAV01@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) protected: __cdecl c10::intrusive_ptr_target::intrusive_ptr_target(class c10::intrusive_ptr_target &&)" (__imp_??0intrusive_ptr_target@c10@@IEAA@$$QEAV01@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: __cdecl c10::Scalar::Scalar(int)" (__imp_??0Scalar@c10@@QEAA@H@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: __cdecl c10::Scalar::Scalar(void)" (__imp_??0Scalar@c10@@QEAA@XZ)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\FV.lib(FV.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) class std::tuple<class at::Tensor,class at::Tensor,class at::Tensor> __cdecl at::svd(class at::Tensor const &,bool,bool)" (__imp_?svd@at@@YA?AV?$tuple@VTensor@at@@V12@V12@@std@@AEBVTensor@1@_N1@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\Detector.lib(Detector.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) class at::Tensor __cdecl at::true_divide(class at::Tensor const &,class c10::Scalar)" (__imp_?true_divide@at@@YA?AVTensor@1@AEBV21@VScalar@c10@@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\Detector.lib(Detector.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) class at::Tensor __cdecl at::zeros(class c10::ArrayRef<__int64>,struct c10::TensorOptions const &)" (__imp_?zeros@at@@YA?AVTensor@1@V?$ArrayRef@_J@c10@@AEBUTensorOptions@4@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\Detector.lib(Detector.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: class at::Tensor & __cdecl at::Tensor::index_put_(class std::initializer_list<struct at::indexing::TensorIndex>,class at::Tensor const &)" (__imp_?index_put_@Tensor@at@@QEAAAEAV12@V?$initializer_list@UTensorIndex@indexing@at@@@std@@AEBV12@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\Detector.lib(Detector.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: class at::Tensor & __cdecl at::Tensor::index_put_(class std::initializer_list<struct at::indexing::TensorIndex>,class c10::Scalar)" (__imp_?index_put_@Tensor@at@@QEAAAEAV12@V?$initializer_list@UTensorIndex@indexing@at@@@std@@VScalar@c10@@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\Detector.lib(Detector.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: class at::Tensor __cdecl at::Tensor::index(class std::initializer_list<struct at::indexing::TensorIndex>)const " (__imp_?index@Tensor@at@@QEBA?AV12@V?$initializer_list@UTensorIndex@indexing@at@@@std@@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\Detector.lib(Detector.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) class at::Tensor __cdecl at::min(class at::Tensor const &,class at::Tensor const &)" (__imp_?min@at@@YA?AVTensor@1@AEBV21@0@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\Detector.lib(Detector.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) class at::Tensor __cdecl at::min(class at::Tensor const &)" (__imp_?min@at@@YA?AVTensor@1@AEBV21@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\Detector.lib(Detector.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) class at::Tensor __cdecl at::empty_like(class at::Tensor const &,struct c10::TensorOptions const &,class c10::optional<enum c10::MemoryFormat>)" (__imp_?empty_like@at@@YA?AVTensor@1@AEBV21@AEBUTensorOptions@c10@@V?$optional@W4MemoryFormat@c10@@@4@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\Detector.lib(Detector.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) class at::Tensor __cdecl at::zeros_like(class at::Tensor const &,struct c10::TensorOptions const &,class c10::optional<enum c10::MemoryFormat>)" (__imp_?zeros_like@at@@YA?AVTensor@1@AEBV21@AEBUTensorOptions@c10@@V?$optional@W4MemoryFormat@c10@@@4@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\Detector.lib(Detector.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) class std::tuple<class at::Tensor,class at::Tensor> __cdecl at::lstsq(class at::Tensor const &,class at::Tensor const &)" (__imp_?lstsq@at@@YA?AV?$tuple@VTensor@at@@V12@@std@@AEBVTensor@1@0@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\Detector.lib(Detector.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) class at::Tensor __cdecl at::diag(class at::Tensor const &,__int64)" (__imp_?diag@at@@YA?AVTensor@1@AEBV21@_J@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\Detector.lib(Detector.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) class at::Tensor __cdecl at::argsort(class at::Tensor const &,__int64,bool)" (__imp_?argsort@at@@YA?AVTensor@1@AEBV21@_J_N@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\Detector.lib(Detector.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) class at::Tensor __cdecl at::matrix_rank(class at::Tensor const &,bool)" (__imp_?matrix_rank@at@@YA?AVTensor@1@AEBV21@_N@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\Detector.lib(Detector.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) class at::Tensor __cdecl at::ones(class c10::ArrayRef<__int64>,struct c10::TensorOptions const &)" (__imp_?ones@at@@YA?AVTensor@1@V?$ArrayRef@_J@c10@@AEBUTensorOptions@4@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\Detector.lib(Detector.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) class at::Tensor __cdecl at::stack(class c10::ArrayRef<class at::Tensor>,__int64)" (__imp_?stack@at@@YA?AVTensor@1@V?$ArrayRef@VTensor@at@@@c10@@_J@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\Detector.lib(Detector.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) class at::Tensor __cdecl at::max(class at::Tensor const &,class at::Tensor const &)" (__imp_?max@at@@YA?AVTensor@1@AEBV21@0@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\Detector.lib(Detector.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) class at::Tensor __cdecl at::max(class at::Tensor const &)" (__imp_?max@at@@YA?AVTensor@1@AEBV21@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\Detector.lib(Detector.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) class at::Tensor __cdecl at::eye(__int64,struct c10::TensorOptions const &)" (__imp_?eye@at@@YA?AVTensor@1@_JAEBUTensorOptions@c10@@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\Detector.lib(Detector.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) class at::Tensor __cdecl at::cat(class c10::ArrayRef<class at::Tensor>,__int64)" (__imp_?cat@at@@YA?AVTensor@1@V?$ArrayRef@VTensor@at@@@c10@@_J@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\Detector.lib(Detector.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) class at::Tensor __cdecl at::round(class at::Tensor const &)" (__imp_?round@at@@YA?AVTensor@1@AEBV21@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\Detector.lib(Detector.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) class std::vector<class at::Tensor,class std::allocator<class at::Tensor> > __cdecl at::where(class at::Tensor const &)" (__imp_?where@at@@YA?AV?$vector@VTensor@at@@V?$allocator@VTensor@at@@@std@@@std@@AEBVTensor@1@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\Detector.lib(Detector.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) class at::Tensor __cdecl at::det(class at::Tensor const &)" (__imp_?det@at@@YA?AVTensor@1@AEBV21@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\Detector.lib(Detector.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) class at::Tensor __cdecl at::native::tensor(class c10::ArrayRef<__int64>,struct c10::TensorOptions const &)" (__imp_?tensor@native@at@@YA?AVTensor@2@V?$ArrayRef@_J@c10@@AEBUTensorOptions@5@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\Detector.lib(Detector.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: void __cdecl torch::jit::Module::to(struct c10::Device,bool)" (__imp_?to@Module@jit@torch@@QEAAXUDevice@c10@@_N@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\Detector.lib(Detector.obj)	1	
...

Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: class at::Tensor & __cdecl at::Tensor::operator+=(class at::Tensor const &)" (__imp_??YTensor@at@@QEAAAEAV01@AEBV01@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\Detector.lib(Detector.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: __cdecl at::indexing::TensorIndex::~TensorIndex(void)" (__imp_??1TensorIndex@indexing@at@@QEAA@XZ)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\Detector.lib(Detector.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: __cdecl at::indexing::TensorIndex::TensorIndex(class at::Tensor)" (__imp_??0TensorIndex@indexing@at@@QEAA@VTensor@2@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\Detector.lib(Detector.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: __cdecl at::indexing::TensorIndex::TensorIndex(struct at::indexing::Slice)" (__imp_??0TensorIndex@indexing@at@@QEAA@USlice@12@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\Detector.lib(Detector.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: __cdecl at::indexing::TensorIndex::TensorIndex(int)" (__imp_??0TensorIndex@indexing@at@@QEAA@H@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\Detector.lib(Detector.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: __cdecl at::indexing::TensorIndex::TensorIndex(__int64)" (__imp_??0TensorIndex@indexing@at@@QEAA@_J@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\Detector.lib(Detector.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: __cdecl at::indexing::Slice::Slice(class c10::optional<__int64>,class c10::optional<__int64>,class c10::optional<__int64>)" (__imp_??0Slice@indexing@at@@QEAA@V?$optional@_J@c10@@00@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\Detector.lib(Detector.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: __cdecl c10::TensorOptions::TensorOptions(enum c10::MemoryFormat)" (__imp_??0TensorOptions@c10@@QEAA@W4MemoryFormat@1@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\Detector.lib(Detector.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: __cdecl c10::TensorOptions::TensorOptions(class caffe2::TypeMeta)" (__imp_??0TensorOptions@c10@@QEAA@VTypeMeta@caffe2@@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\Detector.lib(Detector.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: __cdecl c10::Scalar::Scalar(float)" (__imp_??0Scalar@c10@@QEAA@M@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\Detector.lib(Detector.obj)	1	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) class at::Tensor __cdecl at::sigmoid(class at::Tensor const &)" (__imp_?sigmoid@at@@YA?AVTensor@1@AEBV21@@Z)	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\FV_Test_Lib\Blinker.lib(Blinker.obj)	1	
Error	LNK1120	96 unresolved externals	FV_Test_Lib	D:\Codes\fac_ver\cpp\port\LibtorchPort\x64\Release\FV_Test_Lib.exe	1	

Note:
Just to clear any possible confusion here, I first showed the lib directory I built statically (using the approach mentioned above) and then copied it to the libtorch-release-latest folder which I have in my dependency folder and is showing in the Linker’s Additional Library Directories options. so I’m using the libs that I built earlier not something else.
Previously that it built fine but needed the dll at runtime, I was using the libs I made earlier from the cmake project (explained here) now that I used the new static libs, I’m getting these linker errors!.

Maybe you’ll need some additional macros. __declspec(dllimport) shouldn’t be appearing in the log since you are using static build.

BTW, did you recreate the project after the build? Some flags have changed when you switch from dynamic build to static build. (e.g. C10_BUILD_SHARED_LIBS)

Do you mean the libtorch build directory? or are you referring to my own project that uses libtorch? if its the first one, no I dont think so. I just ran the commands. but if you refer to the latter, I rebuilt everything every time so all modules (libs, etc) get built again and I dont use any prebuilt/possibly with wrong config libs.