facebookresearch / detectron2

Detectron2 is a platform for object detection, segmentation and other visual recognition tasks.
https://detectron2.readthedocs.io/en/latest/
Apache License 2.0
30.45k stars 7.47k forks source link

Can I install detectron2 on Win10? #9

Open JinyuanShao opened 5 years ago

JinyuanShao commented 5 years ago

Can I install detectron2 on Win10?

ppwwyyxx commented 5 years ago

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 https://github.com/facebookresearch/maskrcnn-benchmark/pull/741 or https://github.com/facebookresearch/maskrcnn-benchmark/issues/1042 to see what basic setups are needed, and welcome to share more if you have any luck with it.

JinyuanShao commented 5 years ago

thank you very much!

ShadowLau commented 5 years ago

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

JinyuanShao commented 5 years ago

@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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

@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 commented 5 years ago

Can I install detectron2 on Win10?

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

conansherry commented 5 years ago

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

detectron2 change:

https://github.com/conansherry/detectron2/commit/4d57e128003b6c1f2d07cce75c1821de94f11683

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 commented 5 years ago

@conansherry I tried your git of detectron2, having deleted both decetron2 and detectron2 repos from the pytoch folder. Reference to https://github.com/facebookresearch/detectron2/issues/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 -DCUDA_NO_HALF_OPERATORS -D__CUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr -DCUDA_HAS_FP16=1 -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_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>]" (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>]" (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 commented 5 years ago

@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 commented 5 years ago

@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 -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr -DCUDA_HAS_FP16=1 -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_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 commented 5 years ago

@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 commented 5 years ago

@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 commented 5 years ago

@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 commented 5 years ago

@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 commented 5 years ago

@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 commented 5 years ago

@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 https://github.com/facebookresearch/detectron2/issues/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 commented 5 years ago

@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 commented 5 years ago

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 commented 5 years ago

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:

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 commented 5 years ago

@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 https://github.com/pytorch/extension-cpp/issues/37#issue-459660244 , though in their case they get an explicit depth limit error.

elnazsn1988 commented 5 years ago

@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 commented 5 years ago

@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.

elnazsn1988 commented 5 years ago

@conansherry did you have to build caffe2 seperatley after this? faced issues with Conda and as such used python without conda, could that be causing the errors? am slightly apprehensive of installing pytorch both on Conda and seperatley with python using VC tools 2019, as previously multiple version issues caused massive issues, the caffe2 build took 3 weeks.

When using your command above conda returns :

The following packages will be downloaded:

package                    |            build
---------------------------|-----------------
cudatoolkit-10.1.243       |       h74a9793_0       300.3 MB
ninja-1.9.0                |   py37h74a9793_0         238 KB
pytorch-1.3.0              |py3.7_cuda101_cudnn7_0       479.7 MB  pytorch
torchvision-0.4.1          |       py37_cu101         2.3 MB  pytorch
------------------------------------------------------------
                                       Total:       782.5 MB

The following NEW packages will be INSTALLED:

cudatoolkit pkgs/main/win-64::cudatoolkit-10.1.243-h74a9793_0 ninja pkgs/main/win-64::ninja-1.9.0-py37h74a9793_0 pytorch pytorch/win-64::pytorch-1.3.0-py3.7_cuda101_cudnn7_0 torchvision pytorch/win-64::torchvision-0.4.1-py37_cu101

conansherry commented 5 years ago

@conansherry did you have to build caffe2 seperatley after this? faced issues with Conda and as such used python without conda, could that be causing the errors? am slightly apprehensive of installing pytorch both on Conda and seperatley with python using VC tools 2019, as previously multiple version issues caused massive issues, the caffe2 build took 3 weeks.

When using your command above conda returns :

The following packages will be downloaded:

package                    |            build
---------------------------|-----------------
cudatoolkit-10.1.243       |       h74a9793_0       300.3 MB
ninja-1.9.0                |   py37h74a9793_0         238 KB
pytorch-1.3.0              |py3.7_cuda101_cudnn7_0       479.7 MB  pytorch
torchvision-0.4.1          |       py37_cu101         2.3 MB  pytorch
------------------------------------------------------------
                                       Total:       782.5 MB

The following NEW packages will be INSTALLED: cudatoolkit pkgs/main/win-64::cudatoolkit-10.1.243-h74a9793_0 ninja pkgs/main/win-64::ninja-1.9.0-py37h74a9793_0 pytorch pytorch/win-64::pytorch-1.3.0-py3.7_cuda101_cudnn7_0 torchvision pytorch/win-64::torchvision-0.4.1-py37_cu101

I didn't build caffe2 or pytorh with sources.

elnazsn1988 commented 5 years ago

@conansherry @ppwwyyxx so what worked for me, was using the conansherry detectron2, doing the changes here to every possible version of the documents saved on my system: https://github.com/facebookresearch/detectron2/issues/237#issuecomment-550101526 , changing the ROI files (rotated and not cu) and not sure if this means anything, but also cloning in parallel in Conda. I wasnt able to actually get a complete run in Conda, but somehow now it "seems" to be working.

anzy0621 commented 4 years ago

If it's of any use to anyone I spent hours trying to install detectron2 on my windows 10 system. Here are the steps I followed based on other's solutions, thanks to the others who figured out a way for windows!:

  1. Firstly, I changed the following lines in the files "/ROIAlign_cuda.cu" and "/ROIAlignRotated_cuda.cu" these files can be found in \detectron2\detectron2\layers\csrc\ROIAlignRotated change the following lines in both the files from this:

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

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

to this:

dim3 grid(std::min(at::cuda::ATenCeilDiv(static_cast(output_size), static_cast(512)), static_cast(4096)));

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

  1. Then I changed a line in the following file(spec.h) {your evn path}\Lib\site-packages\torch\include\torch\csrc\jit\argument_spec.h(line 190) change this line from this: static constexpr size_t DEPTH_LIMIT = 128; to this: static const size_t DEPTH_LIMIT = 128;

  2. Then I changed the following line in the following file (cast.h) change this line from this: {your evn path}\Lib\site-packages\torch\include\pybind11\cast.h(line 1449) to this: explicit operator type&() { return ((type)this->value); }

  3. Even then I kept getting the Cuda(I have Cuda 9.2) and MS Visual studio incompatibility(MSV 2019,2017) errors. So I downloaded the CUDA 10.1.243 version and installed it.

  4. Then I ran the " pip install -e . " command in the detectron2 folder from my Anaconda prompt.

My system settings:

victorfu commented 4 years ago

@anzy0621 Follow your steps to setup detectron2 on my windows 10. It works like a charm. Thank you.

YoongiKim commented 4 years ago

Hello. I'm trying to install detectron2 on my windows 10. I followed some guides. But it seems this error is brand new.

  1. Installing by pip install -e . successes. But when running demo.py, it fails with Not compiled with GPU support I think pip install cannot detect my CUDA (even I set PATH settings). So I tried to install with setup.py

  2. Tried to install with setup.py because it detects CUDA OK.

    
    (conda env) python setup.py install
    ~~~ long warnings ~~~

D:/Projects/detectron2/detectron2/layers/csrc/ROIAlign/ROIAlign_cuda.cu(337): error: no instance of function template "at::cuda::ATenCeilDiv" matches the argument list argument types are: (long long, long)

D:/Projects/detectron2/detectron2/layers/csrc/ROIAlign/ROIAlign_cuda.cu(337): error: no instance of overloaded function "std::min" matches the argument list argument types are: (, long)

D:/Projects/detectron2/detectron2/layers/csrc/ROIAlign/ROIAlign_cuda.cu(394): error: no instance of function template "at::cuda::ATenCeilDiv" matches the argument list argument types are: (int64_t, long)

D:/Projects/detectron2/detectron2/layers/csrc/ROIAlign/ROIAlign_cuda.cu(394): error: no instance of overloaded function "std::min" matches the argument list argument types are: (, long)

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


But fails with this error.

### My settings
pytorch 1.4.0 on Anaconda installation
CUDA 10.1 with CuDNN 7.6.5
Visual Studio 2019
Windows 10
YoongiKim commented 4 years ago

For who are struggling to install pycocotools like me. https://github.com/cocodataset/cocoapi/issues/169#issuecomment-462528628

conda install git
pip3 install "git+https://github.com/philferriere/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI"
jefflomax commented 4 years ago

I did, following: https://github.com/conansherry/detectron2

On Tue, Feb 11, 2020 at 12:54 PM Yoongi Kim notifications@github.com wrote:

For who are struggling to install pycocotools like me. cocodataset/cocoapi#169 (comment) https://github.com/cocodataset/cocoapi/issues/169#issuecomment-462528628

conda install git pip3 install "git+https://github.com/philferriere/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI"

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/facebookresearch/detectron2/issues/9?email_source=notifications&email_token=ABLJKZ6OWIKJCRXRBIFFZT3RCLX77A5CNFSM4I7WYPR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELNUCFI#issuecomment-584794389, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLJKZ7SN6DGBL6477DHYD3RCLX77ANCNFSM4I7WYPRQ .

YoongiKim commented 4 years ago

For Not compiled with GPU support error, try (conda_env) python setup.py install instead of pip install -e .

hengxiangYao commented 4 years ago

Have anyone met errors while running setup.py? `ERROR: Command errored out with exit status 1: command: 'C:\Users\timma\Miniconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\timma\detectron2_repo\setup.py'"'"'; file='"'"'C:\Users\timma\detectron2_repo\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' develop --no-deps cwd: C:\Users\timma\detectron2_repo\ Complete output (64 lines): INFO: Could not find files for the given pattern(s). running develop running egg_info writing detectron2.egg-info\PKG-INFO writing dependency_links to detectron2.egg-info\dependency_links.txt writing requirements to detectron2.egg-info\requires.txt writing top-level names to detectron2.egg-info\top_level.txt reading manifest file 'detectron2.egg-info\SOURCES.txt' writing manifest file 'detectron2.egg-info\SOURCES.txt' running build_ext C:\Users\timma\Miniconda3\lib\site-packages\torch\utils\cpp_extension.py:190: UserWarning: Error checking compiler version for cl: [WinError 2] The system cannot find the file specified warnings.warn('Error checking compiler version for {}: {}'.format(compiler, error)) building 'detectron2._C' extension Traceback (most recent call last): File "", line 1, in File "C:\Users\timma\detectron2_repo\setup.py", line 148, in cmdclass={"build_ext": torch.utils.cpp_extension.BuildExtension}, File "C:\Users\timma\Miniconda3\lib\site-packages\setuptools__init__.py", line 144, in setup return distutils.core.setup(**attrs) File "C:\Users\timma\Miniconda3\lib\distutils\core.py", line 148, in setup dist.run_commands() File "C:\Users\timma\Miniconda3\lib\distutils\dist.py", line 966, in run_commands self.run_command(cmd) File "C:\Users\timma\Miniconda3\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "C:\Users\timma\Miniconda3\lib\site-packages\setuptools\command\develop.py", line 38, in run self.install_for_development() File "C:\Users\timma\Miniconda3\lib\site-packages\setuptools\command\develop.py", line 140, in install_for_development self.run_command('build_ext') File "C:\Users\timma\Miniconda3\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "C:\Users\timma\Miniconda3\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "C:\Users\timma\Miniconda3\lib\site-packages\setuptools\command\build_ext.py", line 87, in run _build_ext.run(self) File "C:\Users\timma\Miniconda3\lib\site-packages\Cython\Distutils\old_build_ext.py", line 186, in run _build_ext.build_ext.run(self) File "C:\Users\timma\Miniconda3\lib\distutils\command\build_ext.py", line 340, in run self.build_extensions() File "C:\Users\timma\Miniconda3\lib\site-packages\torch\utils\cpp_extension.py", line 353, in build_extensions build_ext.build_extensions(self) File "C:\Users\timma\Miniconda3\lib\site-packages\Cython\Distutils\old_build_ext.py", line 195, in build_extensions _build_ext.build_ext.build_extensions(self) File "C:\Users\timma\Miniconda3\lib\distutils\command\build_ext.py", line 449, in build_extensions self._build_extensions_serial() File "C:\Users\timma\Miniconda3\lib\distutils\command\build_ext.py", line 474, in _build_extensions_serial self.build_extension(ext) File "C:\Users\timma\Miniconda3\lib\site-packages\setuptools\command\build_ext.py", line 208, in build_extension _build_ext.build_extension(self, ext) File "C:\Users\timma\Miniconda3\lib\distutils\command\build_ext.py", line 534, in build_extension depends=ext.depends) File "C:\Users\timma\Miniconda3\lib\site-packages\torch\utils\cpp_extension.py", line 343, in win_wrap_compile extra_postargs, depends) File "C:\Users\timma\Miniconda3\lib\distutils_msvccompiler.py", line 346, in compile self.initialize() File "C:\Users\timma\Miniconda3\lib\distutils_msvccompiler.py", line 239, in initialize vc_env = _get_vc_env(plat_spec) File "C:\Users\timma\Miniconda3\lib\site-packages\setuptools\msvc.py", line 171, in msvc14_get_vc_env return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env() File "C:\Users\timma\Miniconda3\lib\site-packages\setuptools\msvc.py", line 1623, in return_env if self.vs_ver >= 14 and isfile(self.VCRuntimeRedist): File "C:\Users\timma\Miniconda3\lib\genericpath.py", line 30, in isfile st = os.stat(path) TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

ERROR: Command errored out with exit status 1: 'C:\Users\timma\Miniconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\timma\detectron2_repo\setup.py'"'"'; file='"'"'C:\Users\timma\detectron2_repo\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.`

Similar errors happens while installing pycocotools setup.py, also says File "C:\Users\timma\Miniconda3\lib\genericpath.py", line 30, in isfile st = os.stat(path) TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType Hope someone has an answer. Thanks in advance! I am using Windows 10, Anaconda, python3.7.4, CUDA 10.2.89 ,Microsoft Visual Studio 2019(community) It may be the problem in installed Visual Studio? What components should I install?

jefflomax commented 4 years ago

you've run "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat" before the build? The logs seem to complain about cl.exe, when you run that from the Command Prompt, do you see Microsoft (R) C/C++ Optimizing Compiler Version 19.24.28316 for x86 Copyright (C) Microsoft Corporation. All rights reserved.

In my case, I installed cocoapi from philferriere but never needed to run setup.py for it.

On Wed, Feb 12, 2020 at 2:09 AM hengxiangYao notifications@github.com wrote:

Have anyone met errors while running setup.py? ERROR: Command errored out with exit status 1: command: 'C:\Users\timma\Miniconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\timma\detectron2_repo\setup.py'"'"'; file='"'"'C:\Users\timma\detectron2_repo\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' develop --no-deps cwd: C:\Users\timma\detectron2_repo\ Complete output (64 lines): INFO: Could not find files for the given pattern(s). running develop running egg_info writing detectron2.egg-info\PKG-INFO writing dependency_links to detectron2.egg-info\dependency_links.txt writing requirements to detectron2.egg-info\requires.txt writing top-level names to detectron2.egg-info\top_level.txt reading manifest file 'detectron2.egg-info\SOURCES.txt' writing manifest file 'detectron2.egg-info\SOURCES.txt' running build_ext C:\Users\timma\Miniconda3\lib\site-packages\torch\utils\cpp_extension.py:190: UserWarning: Error checking compiler version for cl: [WinError 2] The system cannot find the file specified warnings.warn('Error checking compiler version for {}: {}'.format(compiler, error)) building 'detectron2._C' extension Traceback (most recent call last): File "", line 1, in File "C:\Users\timma\detectron2_repo\setup.py", line 148, in cmdclass={"build_ext": torch.utils.cpp_extension.BuildExtension}, File "C:\Users\timma\Miniconda3\lib\site-packages\setuptools__init.py", line 144, in setup return distutils.core.setup(**attrs) File "C:\Users\timma\Miniconda3\lib\distutils\core.py", line 148, in setup dist.run_commands() File "C:\Users\timma\Miniconda3\lib\distutils\dist.py", line 966, in run_commands self.run_command(cmd) File "C:\Users\timma\Miniconda3\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "C:\Users\timma\Miniconda3\lib\site-packages\setuptools\command\develop.py", line 38, in run self.install_for_development() File "C:\Users\timma\Miniconda3\lib\site-packages\setuptools\command\develop.py", line 140, in install_for_development self.run_command('build_ext') File "C:\Users\timma\Miniconda3\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "C:\Users\timma\Miniconda3\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "C:\Users\timma\Miniconda3\lib\site-packages\setuptools\command\build_ext.py", line 87, in run _build_ext.run(self) File "C:\Users\timma\Miniconda3\lib\site-packages\Cython\Distutils\old_build_ext.py", line 186, in run _build_ext.build_ext.run(self) File "C:\Users\timma\Miniconda3\lib\distutils\command\build_ext.py", line 340, in run self.build_extensions() File "C:\Users\timma\Miniconda3\lib\site-packages\torch\utils\cpp_extension.py", line 353, in build_extensions build_ext.build_extensions(self) File "C:\Users\timma\Miniconda3\lib\site-packages\Cython\Distutils\old_build_ext.py", line 195, in build_extensions _build_ext.build_ext.build_extensions(self) File "C:\Users\timma\Miniconda3\lib\distutils\command\build_ext.py", line 449, in build_extensions self._build_extensions_serial() File "C:\Users\timma\Miniconda3\lib\distutils\command\build_ext.py", line 474, in _build_extensions_serial self.build_extension(ext) File "C:\Users\timma\Miniconda3\lib\site-packages\setuptools\command\build_ext.py", line 208, in build_extension _build_ext.build_extension(self, ext) File "C:\Users\timma\Miniconda3\lib\distutils\command\build_ext.py", line 534, in build_extension depends=ext.depends) File "C:\Users\timma\Miniconda3\lib\site-packages\torch\utils\cpp_extension.py", line 343, in win_wrap_compile extra_postargs, depends) File "C:\Users\timma\Miniconda3\lib\distutils_msvccompiler.py", line 346, in compile self.initialize() File "C:\Users\timma\Miniconda3\lib\distutils_msvccompiler.py", line 239, in initialize vc_env = _get_vc_env(plat_spec) File "C:\Users\timma\Miniconda3\lib\site-packages\setuptools\msvc.py", line 171, in msvc14_get_vc_env return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env() File "C:\Users\timma\Miniconda3\lib\site-packages\setuptools\msvc.py", line 1623, in return_env if self.vs_ver >= 14 and isfile(self.VCRuntimeRedist): File "C:\Users\timma\Miniconda3\lib\genericpath.py", line 30, in isfile st = os.stat(path) TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType ---------------------------------------- ERROR: Command errored out with exit status 1: 'C:\Users\timma\Miniconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\timma\detectron2_repo\setup.py'"'"'; file='"'"'C:\Users\timma\detectron2_repo\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file__, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output. Similar errors happens while installing pycocotools setup.py, also says File "C:\Users\timma\Miniconda3\lib\genericpath.py", line 30, in isfile st = os.stat(path) TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType Hope someone has an answer. Thanks in advance!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/facebookresearch/detectron2/issues/9?email_source=notifications&email_token=ABLJKZ5AKQC4PVMRYSGA2ODRCOVCZA5CNFSM4I7WYPR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELP2NKQ#issuecomment-585082538, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLJKZ5TDGADBAUE7XJYU43RCOVCZANCNFSM4I7WYPRQ .

sh0416 commented 4 years ago

@conansherry Instead of changing cast.h, I change the type of all_slot from constexpr to const, and the compilation works. Do you think it cause some bug?

WYBupup commented 4 years ago

Hi guys. I face a new issue. Following the above instructions, I successfully install detectron2 on Windows and run the demo successfully. But when I follow the train on single gpu tutorial:https://github.com/facebookresearch/detectron2/blob/master/GETTING_STARTED.md, I got an error: os has no attribute named getuid

I have searched this problem and found that only on Unix that os get attribute getuid(following is the url of the issue)https://github.com/Parsely/streamparse/issues/415

Have you guys finish training successfully? would someone come to explain this to me? I would any explanations!!!

WYBupup commented 4 years ago

Hi guys. I face a new issue. Following the above instructions, I successfully install detectron2 on Windows and run the demo successfully. But when I follow the train on single gpu tutorial:https://github.com/facebookresearch/detectron2/blob/master/GETTING_STARTED.md, I got an error: os has no attribute named getuid

I have searched this problem and found that only on Unix that os get attribute getuid(following is the url of the issue)https://github.com/Parsely/streamparse/issues/415

Have you guys finish training successfully? would someone come to explain this to me? I would any explanations!!!

@conansherry @

conansherry commented 4 years ago

change it to "os.pid()" or whatever u want

发自我的iPhone

------------------ Original ------------------ From: WYBupup <notifications@github.com> Date: Tue,Mar 17,2020 11:27 PM To: facebookresearch/detectron2 <detectron2@noreply.github.com> Cc: conansherry <conansherry@vip.qq.com>, Mention <mention@noreply.github.com> Subject: Re: [facebookresearch/detectron2] Can I install detectron2 on Win10? (#9)

Hi guys. I face a new issue. Following the above instructions, I successfully install detectron2 on Windows and run the demo successfully. But when I follow the train on single gpu tutorial:https://github.com/facebookresearch/detectron2/blob/master/GETTING_STARTED.md, I got an error:

I have searched this problem and found that only on Unix that os get attribute getuid(following is the url of the issue)https://github.com/Parsely/streamparse/issues/415

Have you guys finish training successfully? would someone come to explain this to me? I would any explanations!!!

@conansherry @

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

WYBupup commented 4 years ago

@conansherry thanks for your fast reply. Ihave finished the training successfully. Thanks a lot.

QQ2737499951 commented 4 years ago

WINDOWS安装已经搞定,WINDOWS安装有问题的加QQ群:669412407(注明detectron2)

albertchristianto commented 4 years ago

Hi everyone, does this repository support win 10? yesterday, I have successfully installed detectron2 and run the demo successfully on win10, so I reconsider of using detectron2 for long term project if there is no major problem on windows 10 platform. Will it be okay ? best regards, Albert Christianto

solarflarefx commented 4 years ago

@anzy0621 Do your instructions still hold true for detectron2 v 0.1.3?

It looks like in the latest version the changes to the .cu files are already done.

I am still getting this error: 5 errors detected in the compilation of "C:/Users/Windows/AppData/Local/Temp/tmpxft_00002f20_00000000-10_nms_rotated_cuda.cpp1.ii". error: command 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe' failed with exit status 1

python: 3.6 detectron2: 0.1.3 pytorch: 1.4 torchvision: 0.5.0 cuda: 10.1 cudnn: 7.6.5

kapil-varshney commented 4 years ago

@anzy0621 Do your instructions still hold true for detectron2 v 0.1.3?

It looks like in the latest version the changes to the .cu files are already done.

I am still getting this error: 5 errors detected in the compilation of "C:/Users/Windows/AppData/Local/Temp/tmpxft_00002f20_00000000-10_nms_rotated_cuda.cpp1.ii". error: command 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe' failed with exit status 1

python: 3.6 detectron2: 0.1.3 pytorch: 1.4 torchvision: 0.5.0 cuda: 10.1 cudnn: 7.6.5

@solarflarefx Yes, you are right. I checked out the code. They have made the required changes in ROIAlign_cuda.cu and ROIAlignRotated_cuda.cu

I still have the same error as you do. I have the exact same environment setup. Were you able to figure out a fix?

vvars1 commented 4 years ago

@conansherry

Thank you for the detailed steps provided. I installed detectron2 successfully, but when i'm running the python script i have noticing below error.

AttributeError: module 'detectron2.model_zoo' has no attribute 'get_config_file'

Could you please help me on to fix this error

Xiewp commented 4 years ago

Hi,I install detectron2 on win10 while failed with

C:\Users\87992\AppData\Roaming\Python\Python37\site-packages\torch\include\ATen/core/ivalue_inl.h(624): note: see reference to class template instantiation 'c10::ArrayRef' being compiled error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit status 2

could anybody tell me how to fixed it? I've tried modified argument_spec.h and cast.h but failed.

python 3.7.8 pytorch 1.4.0 torchvision 0.5.0 cuda 10.0 cudnn 7.4.2

Casper-Smet commented 4 years ago

In my experience installing Detectron2 on Windows 10 is perfectly possible, just a bit of a hassle. I would recommend installing all the dependencies separately (preferably through Anaconda, as doing this through PIP has resulted in errors for me in the past). After installing all the dependencies, you can simply use pip install 'git+https://github.com/facebookresearch/detectron2.git'.

At the time I'm writing this, I believe the only thing you cannot currently install through anaconda on Windows is cocotools. The command above will, however, install that just fine.

I have used Detectron2 like this for a few projects now, and it works great! Good luck everyone.

Abalizzw commented 3 years ago

@conansherry

Thank you for the detailed steps provided. I installed detectron2 successfully, but when i'm running the python script i have noticing below error.

AttributeError: module 'detectron2.model_zoo' has no attribute 'get_config_file'

Could you please help me on to fix this error

Did you fix it already? I met the same problem as you. Thank you a lot.

huangweiwade commented 3 years ago

I install detectron2 on win10 while failed with

Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N) [1/1] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin\nvcc -Xcompiler /MD -Xcompiler /wd4819 -Xcompiler /wd4251 -Xcompiler /wd4244 -Xcompiler /wd4267 -Xcompiler /wd4275 -Xcompiler /wd4018 -Xcompiler /wd4190 -Xcompiler /EHsc -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -DWITH_CUDA -IC:\Users\huang\detectron2\detectron2\layers\csrc -ID:\Users\huang\anaconda3\lib\site-packages\torch\include -ID:\Users\huang\anaconda3\lib\site-packages\torch\include\torch\csrc\api\include -ID:\Users\huang\anaconda3\lib\site-packages\torch\include\TH -ID:\Users\huang\anaconda3\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\include" -ID:\Users\huang\anaconda3\include -ID:\Users\huang\anaconda3\include "-ID:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\cppwinrt" -c C:\Users\huang\detectron2\detectron2\layers\csrc\deformable\deform_conv_cuda.cu -o C:\Users\huang\detectron2\build\temp.win-amd64-3.8\Release\Users\huang\detectron2\detectron2\layers\csrc\deformable\deform_conv_cuda.obj -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr -O3 -DCUDA_HAS_FP16=1 -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_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

FAILED: C:/Users/huang/detectron2/build/temp.win-amd64-3.8/Release/Users/huang/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda.obj C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin\nvcc -Xcompiler /MD -Xcompiler /wd4819 -Xcompiler /wd4251 -Xcompiler /wd4244 -Xcompiler /wd4267 -Xcompiler /wd4275 -Xcompiler /wd4018 -Xcompiler /wd4190 -Xcompiler /EHsc -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -DWITH_CUDA -IC:\Users\huang\detectron2\detectron2\layers\csrc -ID:\Users\huang\anaconda3\lib\site-packages\torch\include -ID:\Users\huang\anaconda3\lib\site-packages\torch\include\torch\csrc\api\include -ID:\Users\huang\anaconda3\lib\site-packages\torch\include\TH -ID:\Users\huang\anaconda3\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\include" -ID:\Users\huang\anaconda3\include -ID:\Users\huang\anaconda3\include "-ID:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\cppwinrt" -c C:\Users\huang\detectron2\detectron2\layers\csrc\deformable\deform_conv_cuda.cu -o C:\Users\huang\detectron2\build\temp.win-amd64-3.8\Release\Users\huang\detectron2\detectron2\layers\csrc\deformable\deform_conv_cuda.obj -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr -O3 -DCUDA_HAS_FP16=1 -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_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

D:/Users/huang/anaconda3/lib/site-packages/torch/include\c10/util/ThreadLocalDebugInfo.h(12): warning: modifier is ignored on an enum specifier

D:/Users/huang/anaconda3/lib/site-packages/torch/include\ATen/core/boxing/impl/boxing.h(100): warning: integer conversion resulted in a change of sign

D:/Users/huang/anaconda3/lib/site-packages/torch/include\ATen/record_function.h(13): warning: modifier is ignored on an enum specifier

D:/Users/huang/anaconda3/lib/site-packages/torch/include\ATen/core/op_registration/op_whitelist.h(39): warning: integer conversion resulted in a change of sign

D:/Users/huang/anaconda3/lib/site-packages/torch/include\torch/csrc/jit/ir/ir.h(1347): error: member "torch::jit::ProfileOptionalOp::Kind" may not be initialized

1 error detected in the compilation of "C:/Users/huang/AppData/Local/Temp/tmpxft_00001f20_00000000-10_deform_conv_cuda.cpp1.ii". deform_conv_cuda.cu ninja: build stopped: subcommand failed.

cuda 10.2 vs2019 python 3.8 pytorch 1.7.0

thomasjungblut commented 3 years ago

@huangweiwade just had the same problem. I stumbled upon some bash script to fix a couple of cpp things:

#!/bin/bash

SITE=/mnt/c/Users/thomas.jungblut/AppData/Local/Programs/Python/Python37/Lib/site-packages
sed -i.bak -e 's/CONSTEXPR_EXCEPT_WIN_CUDA/const/g' "${SITE}/torch/include/torch/csrc/jit/api/module.h"
sed -i.bak -e 's/return \*(this->value)/return \*((type\*)this->value)/g' "${SITE}/torch/include/pybind11/cast.h"
sed -i.bak '/static constexpr Symbol Kind/d' "${SITE}/torch/include/torch/csrc/jit/ir/ir.h"

Change the site variable up to your installation path in Conda (D:/Users/huang/anaconda3/lib/site-packages).
Then a plain installation via git clone and python -m pip install -e detectron2 works as advertised.