roytseng-tw / Detectron.pytorch

A pytorch implementation of Detectron. Both training from scratch and inferring directly from pretrained Detectron weights are available.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nvcc.exe failed with exit status 1: Problem installing detectron2 on Windows 10

LotharTUM opened this issue · comments

Hello everybody,
i would appreciate very much your help on the following problem with installing detectron2 on windows 10.

I am getting a nvcc error after trying to build detectron2 with torch 1.5.0 and torchvision 0.6.0, built on cuda 10.2. I am running the command python -m pip install git+https://github.com/facebookresearch/detectron2.git and getting this error message:

_5 errors detected in the compilation of "C:/Users/lotha/AppData/Local/Temp/tmpxft_000016c8_00000000-10_nms_rotated_cuda.cpp1.ii".
nms_rotated_cuda.cu
error: command 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin\nvcc.exe' failed with exit status 1
Error in atexit.run_exitfuncs:
Traceback (most recent call last):
File "C:\Users\lotha\Anaconda3\lib\site-packages\colorama\ansitowin32.py", line 59, in closed
return stream.closed
ValueError: underlying buffer has been detached
ERROR: Failed building wheel for detectron2

  • OS: Windows 10
  • CUDA version: 10.2
  • python version: 3.7
  • pytorch version: 1.5.0, torchvision 0.6.0
  • gcc/ g++ 9.3.0 (minGW)
  • VS build tools 19

I already tried another cuda-version (9.2), i tried VS 17 build tools, did a conda install for pytorch/ torchvision, tried to build from source code and even set back my computer to ensure that the system variables are at default. Beyond, I think its important to mention that detectron2 already worked on my computer - i just uninstalled it. On the install.md-troubleshooting of detectron2 there is mentioned that nvcc-errors might be due to a gcc-incompatibility - but i already tried with gcc 9.2.0 and 7.4.0. So now i am stuck :( Thank you very much!

_C:/Users/lotha/Anaconda3/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/lotha/Anaconda3/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/lotha/Anaconda3/lib/site-packages/torch/include\ATen/Context.h(133): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/lotha/Anaconda3/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/lotha/Anaconda3/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/lotha/Anaconda3/lib/site-packages/torch/include\c10/cuda/CUDAStream.h(171): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/lotha/Anaconda3/lib/site-packages/torch/include\TH/THAllocator.h(60): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/lotha/Anaconda3/lib/site-packages/torch/include\TH/THAllocator.h(66): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/lotha/Anaconda3/lib/site-packages/torch/include\THC/THCAllocator.h(14): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/lotha/AppData/Local/Temp/pip-req-build-fb0oenry/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu(14): error: name must be a namespace name

C:/Users/lotha/AppData/Local/Temp/pip-req-build-fb0oenry/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu(68): error: identifier "single_box_iou_rotated" is undefined
detected during instantiation of "void nms_rotated_cuda_kernel(int, float, const T *, unsigned long long *) [with T=double]"
(105): here

C:/Users/lotha/AppData/Local/Temp/pip-req-build-fb0oenry/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu(68): error: type name is not allowed
detected during instantiation of "void nms_rotated_cuda_kernel(int, float, const T *, unsigned long long *) [with T=double]"
(105): here

C:/Users/lotha/AppData/Local/Temp/pip-req-build-fb0oenry/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu(68): warning: expression has no effect
detected during instantiation of "void nms_rotated_cuda_kernel(int, float, const T *, unsigned long long *) [with T=double]"
(105): here

C:/Users/lotha/AppData/Local/Temp/pip-req-build-fb0oenry/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu(58): warning: variable "cur_box" was set but never used
detected during instantiation of "void nms_rotated_cuda_kernel(int, float, const T *, unsigned long long *) [with T=double]"
(105): here

C:/Users/lotha/AppData/Local/Temp/pip-req-build-fb0oenry/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu(68): error: identifier "single_box_iou_rotated" is undefined
detected during instantiation of "void nms_rotated_cuda_kernel(int, float, const T *, unsigned long long *) [with T=float]"
(105): here

C:/Users/lotha/AppData/Local/Temp/pip-req-build-fb0oenry/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu(68): error: type name is not allowed
detected during instantiation of "void nms_rotated_cuda_kernel(int, float, const T *, unsigned long long *) [with T=float]"
(105): here

C:/Users/lotha/AppData/Local/Temp/pip-req-build-fb0oenry/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu(68): warning: expression has no effect
detected during instantiation of "void nms_rotated_cuda_kernel(int, float, const T *, unsigned long long *) [with T=float]"
(105): here

C:/Users/lotha/AppData/Local/Temp/pip-req-build-fb0oenry/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu(58): warning: variable "cur_box" was set but never used
detected during instantiation of "void nms_rotated_cuda_kernel(int, float, const T *, unsigned long long *) [with T=float]"
(105): here