Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I install detectron2 on Win10? #9

Open
JinyuanShao opened this issue Oct 11, 2019 · 84 comments
Open

Can I install detectron2 on Win10? #9

JinyuanShao opened this issue Oct 11, 2019 · 84 comments

Comments

@JinyuanShao
Copy link

Can I install detectron2 on Win10?

@ppwwyyxx
Copy link
Contributor

We do not officially support windows, but given that maskrcnn-benchmark can run on win10, it probably won't take a lot of changes to run detectron2 on win10.

You can refer to facebookresearch/maskrcnn-benchmark#741 or facebookresearch/maskrcnn-benchmark#1042 to see what basic setups are needed, and welcome to share more if you have any luck with it.

@JinyuanShao
Copy link
Author

thank you very much!

@ShadowLau
Copy link

@jinyuan30 hello, have you installed detectron2 on win10 successfully?

@JinyuanShao
Copy link
Author

@jinyuan30 hello, have you installed detectron2 on win10 successfully?

I turn to Ubuntu, and didn't try on Win10 cause I think maybe there are some unkonwn bug.

@shans96
Copy link

shans96 commented Oct 23, 2019

If it's of any use, attempting to compile without any changes to the code gives the following error:
C:/Python37/lib/site-packages/torch/include\torch/csrc/jit/argument_spec.h(190): error: member "torch::jit::ArgumentSpecCreator::DEPTH_LIMIT" may not be initialized

pytorch/extension-cpp#37 references this problem, but using the patch suggested there raises 4 other issues all within the detectron2/layers/csrc/ROIAlign/ROIAlign_cuda.cu file, all related to type mismatching. Haven't been able to look further yet but maybe the CUDA files could be patched to run detectron2 on Windows.

@akinari1223
Copy link

I tried similar path.
And for the "/ROIAlign_cuda.cu" and "/ROIAlignRotated_cuda.cu",
change from each

dim3 grid(std::min(at::cuda::ATenCeilDiv(output_size, 512L), 4096L));
~
~
dim3 grid(std::min(at::cuda::ATenCeilDiv(grad.numel(), 512L), 4096L));

to

dim3 grid(std::min(at::cuda::ATenCeilDiv(static_cast<int64_t>(output_size), static_cast<int64_t>(512)), static_cast<int64_t>(4096)));
 ~
~
dim3 grid(std::min(at::cuda::ATenCeilDiv(static_cast<int64_t>(grad.numel()), static_cast<int64_t>(512)), static_cast<int64_t>(4096)));

looks like it worked.

@asbe
Copy link

asbe commented Oct 25, 2019

@akinari1223 can you make a patch of your changes? Greatly appreciated.

EDIT: I see now it is mainly an issue in pytorch, never mind.

@conansherry
Copy link

Can I install detectron2 on Win10?

yes you can. I have done for it.
https://github.com/conansherry/detectron2

@conansherry
Copy link

conansherry commented Nov 2, 2019

@ppwwyyxx we can do little change to support windows build. but it refer to pytorch files changed.

detectron2 change:

conansherry/detectron2@4d57e12

pytorch change:

file1: 
  {your evn path}\Lib\site-packages\torch\include\torch\csrc\jit\argument_spec.h
  example:
  {C:\Miniconda3\envs\py36}\Lib\site-packages\torch\include\torch\csrc\jit\argument_spec.h(190)
    static constexpr size_t DEPTH_LIMIT = 128;
      change to -->
    static const size_t DEPTH_LIMIT = 128;
file2: 
  {your evn path}\Lib\site-packages\torch\include\pybind11\cast.h
  example:
  {C:\Miniconda3\envs\py36}\Lib\site-packages\torch\include\pybind11\cast.h(1449)
    explicit operator type&() { return *(this->value); }
      change to -->
    explicit operator type&() { return *((type*)this->value); }

@elnazsn1988
Copy link

elnazsn1988 commented Nov 5, 2019

@conansherry I tried your git of detectron2, having deleted both decetron2 and detectron2 repos from the pytoch folder. Reference to #232 , I am facing a similar set of issues building Detectron2 on Windows10 with CUDA 10.1 and VS 2019 @akinari1223 the changes on ROI cu files were implemented.

Im trying to build detectron2 via setup_py, and recieve the initial error mentioned:

1 error detected in the compilation of "C:/Users/aesnj/AppData/Local/Temp/tmpxft_00007274_00000000-10_deform_conv_cuda.cpp1.ii".
error: command 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe' failed with exit status 1

When opennig the tmp file referenced I see:

_

_C:\Users\aesnj\AppData\Local\Temp\pip-req-build-1ys_emb3>call "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.23.28105/bin/HostX64/x64/../../../../../../../VC/Auxiliary/Build/vcvars64.bat"

** Visual Studio 2019 Developer Command Prompt v16.3.1
** Copyright (c) 2019 Microsoft Corporation

[vcvarsall.bat] Environment initialized for: 'x64'_

_

Prior to recieving mentioned errors, I encounter a ton of warnings in Log :

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe -c C:\projects\pytorch\pytorch\detectron2\detectron2\layers\csrc\deformable\deform_conv_cuda.cu -o build\temp.win-amd64-3.7\Release\projects\pytorch\pytorch\detectron2\detectron2\layers\csrc\deformable\deform_conv_cuda.obj -IC:\projects\pytorch\pytorch\detectron2\detectron2\layers\csrc -IC:\Users\aesnj\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\include -IC:\Users\aesnj\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\aesnj\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\include\TH -IC:\Users\aesnj\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" -IC:\Users\aesnj\AppData\Local\Programs\Python\Python37\include -IC:\Users\aesnj\AppData\Local\Programs\Python\Python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" -Xcompiler /EHsc -Xcompiler /wd4819 -Xcompiler /MD -D__CUDA_NO_HALF_OPERATORS -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=sm_75
deform_conv_cuda.cu

_

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/Exception.h(29): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/Exception.h(30): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/Exception.h(35): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/Exception.h(36): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/core/Allocator.h(21): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/core/Allocator.h(183): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/typeid.h(458): warning: dllexport/dllimport conflict with "caffe2::TypeMeta::_typeMetaDataInstance [with T=caffe2::detail::_Uninitialized]"
(454): here; dllexport assumed

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/typeid.h(579): warning: dllexport/dllimport conflict with "caffe2::TypeIdentifier::Get [with T=uint8_t]"
(83): here; dllexport assumed

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/typeid.h(580): warning: dllexport/dllimport conflict with "caffe2::TypeIdentifier::Get [with T=int8_t]"
(83): here; dllexport assumed

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/typeid.h(581): warning: dllexport/dllimport conflict with "caffe2::TypeIdentifier::Get [with T=int16_t]"
(83): here; dllexport assumed

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/typeid.h(582): warning: dllexport/dllimport conflict with "caffe2::TypeIdentifier::Get [with T=int]"
(83): here; dllexport assumed

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/typeid.h(583): warning: dllexport/dllimport conflict with "caffe2::TypeIdentifier::Get [with T=int64_t]"
(83): here; dllexport assumed

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/typeid.h(584): warning: dllexport/dllimport conflict with "caffe2::TypeIdentifier::Get [with T=c10::Half]"
(83): here; dllexport assumed

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/typeid.h(585): warning: dllexport/dllimport conflict with "caffe2::TypeIdentifier::Get [with T=float]"
(83): here; dllexport assumed

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/typeid.h(586): warning: dllexport/dllimport conflict with "caffe2::TypeIdentifier::Get [with T=double]"
(83): here; dllexport assumed

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/typeid.h(587): warning: dllexport/dllimport conflict with "caffe2::TypeIdentifier::Get [with T=c10::ComplexHalf]"
(83): here; dllexport assumed

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/typeid.h(588): warning: dllexport/dllimport conflict with "caffe2::TypeIdentifier::Get [with T=std::complex]"
(83): here; dllexport assumed

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/typeid.h(589): warning: dllexport/dllimport conflict with "caffe2::TypeIdentifier::Get [with T=std::complex]"
(83): here; dllexport assumed

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/typeid.h(592): warning: dllexport/dllimport conflict with "caffe2::TypeIdentifier::Get [with T=std::string]"
(83): here; dllexport assumed

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/typeid.h(593): warning: dllexport/dllimport conflict with "caffe2::TypeIdentifier::Get [with T=__nv_bool]"
(83): here; dllexport assumed

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/typeid.h(594): warning: dllexport/dllimport conflict with "caffe2::TypeIdentifier::Get [with T=uint16_t]"
(83): here; dllexport assumed

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/typeid.h(595): warning: dllexport/dllimport conflict with "caffe2::TypeIdentifier::Get [with T=char]"
(83): here; dllexport assumed

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/typeid.h(596): warning: dllexport/dllimport conflict with "caffe2::TypeIdentifier::Get [with T=std::unique_ptr<std::mutex, std::default_deletestd::mutex>]"
(83): here; dllexport assumed

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/typeid.h(597): warning: dllexport/dllimport conflict with "caffe2::TypeIdentifier::Get [with T=std::unique_ptr<std::atomic<__nv_bool>, std::default_delete<std::atomic<__nv_bool>>>]"
(83): here; dllexport assumed

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/typeid.h(598): warning: dllexport/dllimport conflict with "caffe2::TypeIdentifier::Get [with T=std::vector<int32_t, std::allocator<int32_t>>]"
(83): here; dllexport assumed

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/typeid.h(599): warning: dllexport/dllimport conflict with "caffe2::TypeIdentifier::Get [with T=std::vector<int64_t, std::allocator<int64_t>>]"
(83): here; dllexport assumed

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/typeid.h(600): warning: dllexport/dllimport conflict with "caffe2::TypeIdentifier::Get [with T=std::vector<unsigned long, std::allocator>]"
(83): here; dllexport assumed

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/typeid.h(601): warning: dllexport/dllimport conflict with "caffe2::TypeIdentifier::Get [with T=__nv_bool *]"
(83): here; dllexport assumed

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/typeid.h(602): warning: dllexport/dllimport conflict with "caffe2::TypeIdentifier::Get [with T=char *]"
(83): here; dllexport assumed

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/typeid.h(603): warning: dllexport/dllimport conflict with "caffe2::TypeIdentifier::Get [with T=int *]"
(83): here; dllexport assumed

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/typeid.h(623): warning: dllexport/dllimport conflict with "caffe2::TypeIdentifier::Get [with T=caffe2::detail::_guard_long_unique]"
(83): here; dllexport assumed

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/typeid.h(624): warning: dllexport/dllimport conflict with "caffe2::TypeIdentifier::Get [with T=caffe2::detail::_guard_long_unique<std::vector<long, std::allocator>>]"
(83): here; dllexport assumed

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/typeid.h(629): warning: dllexport/dllimport conflict with "caffe2::TypeIdentifier::Get [with T=float *]"
(83): here; dllexport assumed

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/typeid.h(630): warning: dllexport/dllimport conflict with "caffe2::TypeIdentifier::Get [with T=c10::Half *]"
(83): here; dllexport assumed

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/typeid.h(631): warning: dllexport/dllimport conflict with "caffe2::TypeIdentifier::Get [with T=c10::qint8]"
(83): here; dllexport assumed

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/typeid.h(632): warning: dllexport/dllimport conflict with "caffe2::TypeIdentifier::Get [with T=c10::quint8]"
(83): here; dllexport assumed

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/typeid.h(633): warning: dllexport/dllimport conflict with "caffe2::TypeIdentifier::Get [with T=c10::qint32]"
(83): here; dllexport assumed

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/typeid.h(634): warning: dllexport/dllimport conflict with "caffe2::TypeIdentifier::Get [with T=c10::BFloat16]"
(83): here; dllexport assumed

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/typeid.h(635): warning: dllexport/dllimport conflict with "caffe2::TypeIdentifier::Get [with T=caffe2::_CaffeHighestPreallocatedTypeId]"
(83): here; dllexport assumed

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/intrusive_ptr.h(63): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/intrusive_ptr.h(64): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/core/Storage.h(182): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/core/TensorTypeSet.h(44): warning: integer conversion resulted in a change of sign

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/util/logging_is_not_google_glog.h(47): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/core/TensorImpl.h(202): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/core/TensorImpl.h(1575): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/core/TensorImpl.h(1578): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/core/TensorImpl.h(1600): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/core/TensorImpl.h(1601): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/core/TensorImpl.h(1626): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\c10/core/TensorImpl.h(1629): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/Generator.h(75): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/NamedTensor.h(53): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/TensorBody.h(999): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/jit_type.h(370): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/jit_type.h(603): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/jit_type.h(604): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/jit_type.h(607): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/jit_type.h(619): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/jit_type.h(734): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/jit_type.h(783): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/jit_type.h(855): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/jit_type.h(857): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/jit_type.h(1516): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/jit_type.h(1517): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/jit_type.h(1519): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/jit_type.h(1523): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/jit_type.h(1526): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/jit_type.h(1573): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/ivalue_inl.h(118): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/ivalue_inl.h(138): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/ivalue_inl.h(139): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/ivalue_inl.h(183): warning: base class dllexport/dllimport specification differs from that of the derived class

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/ivalue_inl.h(195): warning: base class dllexport/dllimport specification differs from that of the derived class

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/ivalue_inl.h(205): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/ivalue_inl.h(296): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/ivalue_inl.h(297): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/ivalue_inl.h(298): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/ivalue_inl.h(301): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/ivalue_inl.h(302): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/ivalue_inl.h(308): warning: base class dllexport/dllimport specification differs from that of the derived class

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/ivalue_inl.h(370): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/ivalue_inl.h(371): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/ATenDispatch.h(120): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/ATenDispatch.h(144): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/ATenDispatch.h(145): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/boxing/KernelFunction.h(375): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/boxing/KernelFunction.h(376): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/dispatch/Dispatcher.h(116): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/dispatch/Dispatcher.h(117): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/dispatch/Dispatcher.h(118): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/dispatch/Dispatcher.h(119): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/dispatch/Dispatcher.h(147): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/core/dispatch/Dispatcher.h(162): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/CPUGenerator.h(32): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/CPUGenerator.h(33): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/CPUGenerator.h(34): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/Context.h(124): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/Context.h(125): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/Context.h(130): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/Context.h(131): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/Context.h(132): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/TensorGeometry.h(56): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\ATen/TensorGeometry.h(57): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/autograd/variable.h(353): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/autograd/variable.h(356): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/autograd/variable.h(357): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/autograd/variable.h(359): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/autograd/variable.h(360): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/autograd/variable.h(376): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/tracer.h(49): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/tracer.h(52): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/tracer.h(85): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/tracer.h(181): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/tracer.h(307): warning: dllexport/dllimport conflict with "torch::jit::tracer::addInputs"
(295): here; dllexport assumed

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/tracer.h(311): warning: dllexport/dllimport conflict with "torch::jit::tracer::addInputs"
(301): here; dllexport assumed

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/attributes.h(87): warning: base class dllexport/dllimport specification differs from that of the derived class

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/attributes.h(101): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/attributes.h(104): warning: base class dllexport/dllimport specification differs from that of the derived class

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/attributes.h(118): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/scope.h(22): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/source_range.h(163): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/constants.h(20): warning: base class dllexport/dllimport specification differs from that of the derived class

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/operator.h(154): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/operator.h(158): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/operator.h(162): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/operator.h(164): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/operator.h(165): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/ir.h(245): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/ir.h(246): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/ir.h(248): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/ir.h(251): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/ir.h(252): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/ir.h(768): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/data/samplers/distributed.h(96): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/data/samplers/distributed.h(129): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/argument_spec.h(190): error: member "torch::jit::ArgumentSpecCreator::DEPTH_LIMIT" may not be initialized

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/argument_spec.h(198): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/interpreter.h(52): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/graph_executor.h(51): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/script/slot.h(57): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/function.h(108): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/function.h(110): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/function.h(115): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/function.h(123): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/function.h(130): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/function.h(135): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/script/compilation_unit.h(247): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/script/compilation_unit.h(249): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/script/compilation_unit.h(250): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/script/compilation_unit.h(257): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/script/module.h(102): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/script/module.h(455): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/script/module.h(494): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/script/module.h(553): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/script/module.h(556): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/serialize/output-archive.h(74): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/nn/module.h(554): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/nn/module.h(557): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/nn/module.h(560): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/nn/module.h(563): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/nn/modules/container/functional.h(94): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/nn/modules/conv.h(35): warning: field of class type without a DLL interface used in a class with a DLL interface
detected during instantiation of class "torch::nn::ConvImpl<D, Derived> [with D=1ULL, Derived=torch::nn::Conv1dImpl]"
(49): here

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/nn/modules/conv.h(35): warning: field of class type without a DLL interface used in a class with a DLL interface
detected during instantiation of class "torch::nn::ConvImpl<D, Derived> [with D=2ULL, Derived=torch::nn::Conv2dImpl]"
(66): here

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/nn/modules/conv.h(35): warning: field of class type without a DLL interface used in a class with a DLL interface
detected during instantiation of class "torch::nn::ConvImpl<D, Derived> [with D=3ULL, Derived=torch::nn::Conv3dImpl]"
(83): here

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/nn/options/fold.h(20): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/nn/options/fold.h(23): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/nn/options/fold.h(27): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/nn/options/fold.h(31): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/nn/options/fold.h(34): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/nn/modules/pooling.h(27): warning: field of class type without a DLL interface used in a class with a DLL interface
detected during instantiation of class "torch::nn::AvgPoolImpl<D, Derived> [with D=1ULL, Derived=torch::nn::AvgPool1dImpl]"
(35): here

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/nn/modules/pooling.h(27): warning: field of class type without a DLL interface used in a class with a DLL interface
detected during instantiation of class "torch::nn::AvgPoolImpl<D, Derived> [with D=2ULL, Derived=torch::nn::AvgPool2dImpl]"
(52): here

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/nn/modules/pooling.h(27): warning: field of class type without a DLL interface used in a class with a DLL interface
detected during instantiation of class "torch::nn::AvgPoolImpl<D, Derived> [with D=3ULL, Derived=torch::nn::AvgPool3dImpl]"
(69): here

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/nn/modules/pooling.h(97): warning: field of class type without a DLL interface used in a class with a DLL interface
detected during instantiation of class "torch::nn::MaxPoolImpl<D, Derived> [with D=1ULL, Derived=torch::nn::MaxPool1dImpl]"
(105): here

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/nn/modules/pooling.h(97): warning: field of class type without a DLL interface used in a class with a DLL interface
detected during instantiation of class "torch::nn::MaxPoolImpl<D, Derived> [with D=2ULL, Derived=torch::nn::MaxPool2dImpl]"
(126): here

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/nn/modules/pooling.h(97): warning: field of class type without a DLL interface used in a class with a DLL interface
detected during instantiation of class "torch::nn::MaxPoolImpl<D, Derived> [with D=3ULL, Derived=torch::nn::MaxPool3dImpl]"
(147): here

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/nn/modules/pooling.h(179): warning: field of class type without a DLL interface used in a class with a DLL interface
detected during instantiation of class "torch::nn::AdaptiveMaxPoolImpl<D, Derived> [with D=1ULL, Derived=torch::nn::AdaptiveMaxPool1dImpl]"
(188): here

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/nn/modules/pooling.h(179): warning: field of class type without a DLL interface used in a class with a DLL interface
detected during instantiation of class "torch::nn::AdaptiveMaxPoolImpl<D, Derived> [with D=2ULL, Derived=torch::nn::AdaptiveMaxPool2dImpl]"
(211): here

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/nn/modules/pooling.h(179): warning: field of class type without a DLL interface used in a class with a DLL interface
detected during instantiation of class "torch::nn::AdaptiveMaxPoolImpl<D, Derived> [with D=3ULL, Derived=torch::nn::AdaptiveMaxPool3dImpl]"
(234): here

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/nn/modules/rnn.h(71): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/nn/modules/rnn.h(73): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/nn/modules/rnn.h(75): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/nn/modules/rnn.h(77): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/nn/modules/rnn.h(113): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/nn/modules/rnn.h(110): warning: field of class type without a DLL interface used in a class with a DLL interface
detected during instantiation of class "torch::nn::detail::RNNImplBase [with Derived=torch::nn::RNNImpl]"
(122): here

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/nn/modules/rnn.h(110): warning: field of class type without a DLL interface used in a class with a DLL interface
detected during instantiation of class "torch::nn::detail::RNNImplBase [with Derived=torch::nn::LSTMImpl]"
(151): here

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/nn/modules/rnn.h(110): warning: field of class type without a DLL interface used in a class with a DLL interface
detected during instantiation of class "torch::nn::detail::RNNImplBase [with Derived=torch::nn::GRUImpl]"
(175): here

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/optim/optimizer.h(83): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/optim/adagrad.h(28): warning: base class dllexport/dllimport specification differs from that of the derived class

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/optim/adagrad.h(44): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/optim/adagrad.h(45): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/optim/adam.h(31): warning: base class dllexport/dllimport specification differs from that of the derived class

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/optim/adam.h(45): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/optim/adam.h(46): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/optim/adam.h(47): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/optim/adam.h(48): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/optim/lbfgs.h(27): warning: base class dllexport/dllimport specification differs from that of the derived class

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/optim/lbfgs.h(48): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/optim/lbfgs.h(49): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/optim/lbfgs.h(50): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/optim/lbfgs.h(51): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/optim/rmsprop.h(34): warning: base class dllexport/dllimport specification differs from that of the derived class

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/optim/rmsprop.h(50): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/optim/rmsprop.h(51): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/optim/rmsprop.h(52): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/optim/sgd.h(31): warning: base class dllexport/dllimport specification differs from that of the derived class

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include/torch/csrc/api/include\torch/optim/sgd.h(46): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/autograd/record_function.h(25): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/autograd/record_function.h(90): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/autograd/profiler.h(97): warning: modifier is ignored on an enum specifier

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/autograd/profiler.h(112): warning: modifier is ignored on an enum specifier

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/autograd/profiler.h(169): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/autograd/profiler.h(245): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/autograd/saved_variable.h(46): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/autograd/saved_variable.h(49): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/autograd/saved_variable.h(50): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/autograd/function.h(353): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/autograd/function.h(355): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/autograd/function.h(356): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/autograd/function.h(357): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/autograd/function.h(358): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/autograd/custom_function.h(84): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/autograd/custom_function.h(105): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/autograd/custom_function.h(106): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/autograd/custom_function.h(107): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/autograd/custom_function.h(108): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/autograd/custom_function.h(113): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/aesnj/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/autograd/custom_function.h(129): warning: field of class type without a DLL interface used in a class with a DLL interface__

@conansherry
Copy link

conansherry commented Nov 5, 2019

@elnazsn1988
please follow commands of my repo.
several files must be changed manually.
https://github.com/conansherry/detectron2

file1: 
  {your evn path}\Lib\site-packages\torch\include\torch\csrc\jit\argument_spec.h
  example:
  {C:\Miniconda3\envs\py36}\Lib\site-packages\torch\include\torch\csrc\jit\argument_spec.h(190)
    static constexpr size_t DEPTH_LIMIT = 128;
      change to -->
    static const size_t DEPTH_LIMIT = 128;
file2: 
  {your evn path}\Lib\site-packages\torch\include\pybind11\cast.h
  example:
  {C:\Miniconda3\envs\py36}\Lib\site-packages\torch\include\pybind11\cast.h(1449)
    explicit operator type&() { return *(this->value); }
      change to -->
    explicit operator type&() { return *((type*)this->value); }

@elnazsn1988
Copy link

@conansherry done, changed both argument_spec.h and cast.h , git cloned your detectron2, recieved following error :

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe -c C:\projects\pytorch\pytorch\detectron2\detectron2\layers\csrc\box_iou_rotated\box_iou_rotated_cuda.cu -o build\temp.win-amd64-3.7\Release\projects\pytorch\pytorch\detectron2\detectron2\layers\csrc\box_iou_rotated\box_iou_rotated_cuda.obj -IC:\projects\pytorch\pytorch\detectron2\detectron2\layers\csrc -IC:\Users\aesnj\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\include -IC:\Users\aesnj\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\aesnj\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\include\TH -IC:\Users\aesnj\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" -IC:\Users\aesnj\AppData\Local\Programs\Python\Python37\include -IC:\Users\aesnj\AppData\Local\Programs\Python\Python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" -Xcompiler /EHsc -Xcompiler /wd4819 -Xcompiler /MD -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=sm_75
nvcc fatal : Could not set up the environment for Microsoft Visual Studio using 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.23.28105/bin/HostX86/x64/../../../../../../../VC/Auxiliary/Build/vcvars64.bat'
error: command 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe' failed with exit status 1

@conansherry
Copy link

conansherry commented Nov 5, 2019

@elnazsn1988
your error:

nvcc fatal : Could not set up the environment for Microsoft Visual Studio using 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.23.28105/bin/HostX86/x64/../../../../../../../VC/Auxiliary/Build/vcvars64.bat'
error: command 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe' failed with exit status 1

the problem is your nvcc.exe and cl.exe is executable. please check your PATH environment.

find your vcvars64.bat and run it in the console.

@elnazsn1988
Copy link

@conansherry checked and ran vcvars64.bat in the Administrator x64 Native Tolls Command Prompt for VS 2019:

c:> pushd C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build> vcvars64.bat


** Visual Studio 2019 Developer Command Prompt v16.3.1
** Copyright (c) 2019 Microsoft Corporation


[vcvarsall.bat] Environment initialized for: 'x64'

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build>

I had tried this before I cloned detectron2, I then clone your detectron2 into pytorch having moved the directory to it. Should I be cloning somewhere else, or is there anything else I can check for my enviroment variables?

@conansherry
Copy link

conansherry commented Nov 5, 2019

@elnazsn1988
I search it in google. the similarity problem
https://stackoverflow.com/questions/55663890/how-to-solve-nvcc-fatal-could-not-set-up-the-environment-for-microsoft-visua

you can use nvcc.exe to compile a simplest file to check if your environment is correct

@elnazsn1988
Copy link

@conansherry also, I have two argument_spec.h files, one sits in : C:\projects\pytorch\pytorch\torch\include\torch\csrc\jit ,
and the other in :
C:\projects\pytorch\pytorch\torch\csrc\jit

I change both to your specs, is this an issue?

@conansherry
Copy link

conansherry commented Nov 5, 2019

@conansherry also, I have two argument_spec.h files, one sits in : C:\projects\pytorch\pytorch\torch\include\torch\csrc\jit ,
and the other in :
C:\projects\pytorch\pytorch\torch\csrc\jit

I change both to your specs, is this an issue?

the issue is nvcc.exe dosen't work correctly, Not related to pytorch.

@elnazsn1988
Copy link

elnazsn1988 commented Nov 5, 2019

@conansherry checked enviroment variables and did extended google search, / and %path% existed around tmp folder and Temp folder in enviroment variables, now removed - I get a different error #232 which was my original one before using your version of detectron2 :

1 error detected in the compilation of "C:/Users/aesnj/AppData/Local/Temp/tmpxft_00009754_00000000-10_deform_conv_cuda.cpp1.ii".
error: command 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe' failed with exit status 1

@conansherry
Copy link

conansherry commented Nov 5, 2019

@elnazsn1988
hello.cu:

#include <stdio.h>

__global__ void cuda_hello(){
    printf("Hello World from GPU!\n");
}

int main() {
    cuda_hello<<<1,1>>>(); 
    return 0;
}

do:
nvcc hello.cu -o hello

if your env is correct, you will get a executable file named "hello.exe".

@elnazsn1988
Copy link

elnazsn1988 commented Nov 5, 2019

response to above is an "hello.exe" executable file in the path specified where I saved the hello.cu text document:

C:\Users\aesnj>nvcc hello.cu -o hello
hello.cu
Creating library hello.lib and object hello.exp

C:\Users\aesnj>

@conansherry
Copy link

conansherry commented Nov 5, 2019

response to above is an "hello.exe" executable file in the path specified where I saved the hello.cu text document:

C:\Users\aesnj>nvcc hello.cu -o hello
hello.cu
Creating library hello.lib and object hello.exp
C:\Users\aesnj>

The problem may occur when using python to call nvcc to compile. Sorry, I have not encountered a similar problem.
My env list:

  • windows10 1903
  • visual studio 2019 enterprise
  • conda environment(python=3.6)
  • cuda10.1

you can search in google with key word "nvcc fatal : Could not set up the environment for Microsoft Visual Studio". There are many similar problems.

@elnazsn1988
Copy link

@conansherry could you possibly give a step by step commands list of how you built caffe2 on pytorch before all this, maybe I should wipe everything clean and start there and this is baffling. The file in the Temp folder its trying to access is the same one throwing up the error as pytorch/extension-cpp#37 (comment) , though in their case they get an explicit depth limit error.

@elnazsn1988
Copy link

@conansherry also do you also use Pytorch 1.3? as the normal detectron clone from the facebookresearch folder needed it I upgraded from 1.2 to 1.3 despite it being experimental

@conansherry
Copy link

@conansherry also do you also use Pytorch 1.3? as the normal detectron clone from the facebookresearch folder needed it I upgraded from 1.2 to 1.3 despite it being experimental

I use pytorch1.3. and use "conda install pytorch torchvision cudatoolkit=10.1 -c pytorch" to install pytorch.

@markstrefford
Copy link

markstrefford commented Jun 4, 2021

Ah! Fixed it! conda install pywin32 fixes it. Here's my yml file:

name: detectron2
channels:
  - pytorch
  - conda-forge
  - anaconda
  - defaults
dependencies:
  - python=3.8
  - numpy
  - pywin32
  - cudatoolkit=11.0
  - pytorch==1.7.1
  - torchvision
  - git
  - pip
  - pip:
    - git+https://github.com/facebookresearch/detectron2.git@v0.3

What compiler did you use? This does not work for me with VS2015 (v140, update 3).

@akkiss You need VS2017 or later

@xiezhiyu275
Copy link

rtx3060
python3.7
pytorch1.7.1
cuda11.1

File "D:\Desktop\detectron2_solov2_six\AdelaiDet-master\detectron2\data_init_.py", line 4, in
from .build import (
File "D:\Desktop\detectron2_solov2_six\AdelaiDet-master\detectron2\data\build.py", line 12, in
from detectron2.structures import BoxMode
File "D:\Desktop\detectron2_solov2_six\AdelaiDet-master\detectron2\structures_init_.py", line 6, in
from .keypoints import Keypoints, heatmaps_to_keypoints
File "D:\Desktop\detectron2_solov2_six\AdelaiDet-master\detectron2\structures\keypoints.py", line 6, in
from detectron2.layers import interpolate
File "D:\Desktop\detectron2_solov2_six\AdelaiDet-master\detectron2\layers_init_.py", line 3, in
from .deform_conv import DeformConv, ModulatedDeformConv
File "D:\Desktop\detectron2_solov2_six\AdelaiDet-master\detectron2\layers\deform_conv.py", line 10, in
from detectron2 import _C
ImportError: DLL load failed:

@solarflarefx
Copy link

solarflarefx commented Jun 10, 2021

@ppwwyyxx One question I have is that if one gets detectron2 running in Windows on a multi-gpu machine, could that setup work for DDP training? It looks like DDP was added to Windows on PyTorch release 1.7: https://pytorch.org/blog/pytorch-1.7-released/

One question is would anything have to be changed to get train_net.py working? Would you have to force a gloo backend?

@henry-luo
Copy link

henry-luo commented Jun 29, 2021

@xiezhiyu275 I encountered same DLL loading error as you, and have just managed to resolve it.
The cause of the problem was that the binary DLLs were not actually properly built.

To build Detectron2 on Windows, you'll need to:

  • install PyTorch
  • install Visual Studio 2017 or 2019
  • run the vcvars64.bat from your VS installation, e.g. "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat", which will set the environment variables for C/C++ compiling
  • python setup.py build develop

It is important to run vcvars64.bat before running setup.py. Without vcvars64.bat, setup.py will only install the Python files without building the binary DLLs, thus leading to the error.

Can refer to this repo: https://github.com/conansherry/detectron2 for more info.

@yogeshkumarpilli
Copy link

Hello
If you are facing issues with windows installation,
please refer this "https://github.com/yogeshkumarpilli/detectron2/blob/master/README.md"
I did it successfully with the latest build version of detectron2 i.e v0.5

Cheers

@austinulfers
Copy link

Ah! Fixed it! conda install pywin32 fixes it. Here's my yml file:

name: detectron2
channels:
  - pytorch
  - conda-forge
  - anaconda
  - defaults
dependencies:
  - python=3.8
  - numpy
  - pywin32
  - cudatoolkit=11.0
  - pytorch==1.7.1
  - torchvision
  - git
  - pip
  - pip:
    - git+https://github.com/facebookresearch/detectron2.git@v0.3

This worked like a charm for my system which has an RTX 3070.

@MilkClouds
Copy link

MilkClouds commented Nov 24, 2021

In Windows 10
after let ninja.exe on PATH, I succeeded installing detectron2 v0.6
I also installed pywin32, and sth else few that I don't remember, but I think it is due to ninja.exe that installation succeeded.

What I have done:

choco install visualstudio2017-workload-vctools
# letting ninja.exe on my path
# cuda 11.3, pytorch 1.10.0
# installed detectron v0.6 by cloning + pip install cloned repository

# I also installed pywin32, but I guess it isn't the component to make detectron installation succeed.

I also executed inference code of videopose3d successfully. no error.

I hope anybody who want to install this on windows got help.

@akkiss
Copy link

akkiss commented Dec 2, 2021

Also had problems building detectron2 on windows, bottom line is it builds with ninja but does not build without it (see details in #2770).

ppwwyyxx pushed a commit that referenced this issue Jan 2, 2022
Fix a small typo
ppwwyyxx added a commit that referenced this issue Jan 2, 2022
Summary:
(#9)
Pull Request resolved: fairinternal/detectron2#83

Reviewed By: wanyenlo

Differential Revision: D13779774

Pulled By: ppwwyyxx

fbshipit-source-id: 0d55acb44d65ce6936bba16c16a1fbbfd52435df
@EtagiBI
Copy link

EtagiBI commented Jan 17, 2022

Here's my environment.yml file:

name: detectron2win
channels:
  - pytorch
  - conda-forge
  - anaconda
  - defaults
dependencies:
  - python=3.7
  - numpy
  - pywin32
  - cudatoolkit=11.3
  - pytorch==1.10.1
  - torchvision
  - git
  - pip
  - pip:
    - git+https://github.com/facebookresearch/detectron2.git@v0.6

When I run conda env create -f environment.yml, I get the following error:

... 
copying detectron2\model_zoo\configs\new_baselines\mask_rcnn_R_50_FPN_50ep_LSJ.py -> build\lib.win-amd64-3.7\detectron2\model_zoo\configs\new_baselines
    running build_ext
    error: [WinError 2] The system cannot find the file specified

failed

CondaEnvException: Pip failed

@QQ2737499951

This comment was marked as spam.

@EtagiBI
Copy link

EtagiBI commented Jan 18, 2022

I've tried a bunch of different instructions, but still can't get past this build_ext-related error:
https://stackoverflow.com/questions/70751751/cant-build-detectron2-on-windows-10

Any help is appreciated!

@ouhkedu
Copy link

ouhkedu commented May 11, 2022

conda create -n detectron_env python=3.8
conda activate detectron_env
pip install cython
conda install pytorch torchvision torchaudio cudatoolkit=11.0 -c pytorch
git clone https://github.com/facebookresearch/detectron2.git
cd detectron2
pip install -e .
pip install opencv-python
conda install pywin32

======Work on my WindowsOS with "cpu" , run underneath code...

from detectron2.engine import DefaultPredictor
from detectron2.data import MetadataCatalog
from detectron2.config import get_cfg
from detectron2.utils.visualizer import ColorMode, Visualizer
from detectron2 import model_zoo

import cv2
import numpy as np
import requests

Load an image

res = requests.get("https://live.staticflickr.com/700/33224654191_fdaee2e3f1_c_d.jpg")
image = np.asarray(bytearray(res.content), dtype="uint8")
image = cv2.imdecode(image, cv2.IMREAD_COLOR)

config_file = 'COCO-Detection/faster_rcnn_R_101_FPN_3x.yaml'
cfg = get_cfg()
cfg.merge_from_file(model_zoo.get_config_file(config_file))
cfg.MODEL.ROI_HEADS.SCORE_THRESH_TEST = 0.75 # Threshold
cfg.MODEL.WEIGHTS = model_zoo.get_checkpoint_url(config_file)
cfg.MODEL.DEVICE = "cpu" #"cuda" # cpu or cuda

Create predictor

predictor = DefaultPredictor(cfg)

Make prediction

output = predictor(image)
print(output)
v = Visualizer(image[:, :, ::-1],
scale=0.8,
metadata=MetadataCatalog.get(cfg.DATASETS.TRAIN[0]),
instance_mode=ColorMode.IMAGE
)
v = v.draw_instance_predictions(output["instances"].to("cpu"))
cv2.imshow('images', v.get_image()[:, :, ::-1])
cv2.waitKey(0)

@QQ2737499951

This comment was marked as spam.

@ouhkedu

This comment was marked as spam.

niqbal996 pushed a commit to niqbal996/detectron2 that referenced this issue Jun 15, 2023
* add DAB-DETR R101 training configs

* refine cfg

Co-authored-by: ntianhe ren <rentianhe@dgx061.scc.idea>
niqbal996 pushed a commit to niqbal996/detectron2 that referenced this issue Jun 15, 2023
* add dn detr projects

* test

* Align DAB-DETR-R101 training configs (facebookresearch#9)

* add DAB-DETR R101 training configs

* refine cfg

Co-authored-by: ntianhe ren <rentianhe@dgx061.scc.idea>

* Clean utils and add dist function (facebookresearch#13)

* clean utils code

* refine format

Co-authored-by: ntianhe ren <rentianhe@dgx061.scc.idea>

* delete meta_arch (facebookresearch#14)

Co-authored-by: ntianhe ren <rentianhe@dgx061.scc.idea>

* add dn-detr r50 training config

Co-authored-by: feng li <lifeng@mgmt04-eno1>
Co-authored-by: Ren Tianhe <48727989+rentainhe@users.noreply.github.com>
Co-authored-by: ntianhe ren <rentianhe@dgx061.scc.idea>
@khushaljethava
Copy link

Try this one, it works on Windows 10 and 11 for me.

pip install git+https://github.com/khushaljethava/detectron2.git

@QQ2737499951
Copy link

QQ2737499951 commented Aug 5, 2023 via email

@MatiasGil88
Copy link

Try this one, it works on Windows 10 and 11 for me.

pip install git+https://github.com/khushaljethava/detectron2.git

Is there a way you can do a step by step to try this? Does it works with gpu?

@QQ2737499951
Copy link

QQ2737499951 commented Nov 7, 2023 via email

@carlosedubarreto
Copy link

Try this one, it works on Windows 10 and 11 for me.
pip install git+https://github.com/khushaljethava/detectron2.git

Is there a way you can do a step by step to try this? Does it works with gpu?

Hello @MatiasGil88 , I was able to install detectron2 some time ago using this explanation from stackexchage

https://stackoverflow.com/questions/60631933/install-detectron2-on-windows-10/72784255#72784255

@MatiasGil88
Copy link

Try this one, it works on Windows 10 and 11 for me.
pip install git+https://github.com/khushaljethava/detectron2.git

Is there a way you can do a step by step to try this? Does it works with gpu?

Hello @MatiasGil88 , I was able to install detectron2 some time ago using this explanation from stackexchage

https://stackoverflow.com/questions/60631933/install-detectron2-on-windows-10/72784255#72784255

Where you able to use gpu?

@carlosedubarreto
Copy link

yep, using cuda 11.7

here are my notes with more information
image

@MatiasGil88
Copy link

yep, using cuda 11.7

here are my notes with more information image

Amazing Carlos, huge thanks!!

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

No branches or pull requests