conansherry / detectron2

detectron2 windows build
Apache License 2.0
223 stars 54 forks source link

deform_conv_cuda.cu(954): error: identifier "AT_CHECK" is undefined Win10 #12

Closed washburn125 closed 4 years ago

washburn125 commented 4 years ago

I follows the given installation instractions but when I run python setup.py build develop I get:

my python detectron2/utils/collect_env.py output :

sys.platform           win32
Python                 3.7.6 | packaged by conda-forge | (default, Mar 23 2020, 22:22:21) [MSC v.1916 64 bit (AMD64)]
Numpy                  1.18.1
detectron2._C          failed to import
DETECTRON2_ENV_MODULE  <not set>
PyTorch                1.5.0
PyTorch Debug Build    False
torchvision            0.6.0
CUDA available         True
GPU 0                  Quadro M2200
CUDA_HOME              C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1
NVCC                   Not Available
Pillow                 7.1.2
cv2                    `4.2.0`

Could you please give me some guidelines/ideas how to fix it?

veer5551 commented 4 years ago

Hey @washburn125 ,

I am facing the similar issue. Were you able to get a solution?

Error:

C:\Users\msjmf59\Documents\Projects\Auto_Labelling\Models\Pytorch\cns\detectron2\detectron2\layers\csrc\deformable\deform_conv.h(136): error: identifier "AT_CHECK" is undefined

C:\Users\msjmf59\Documents\Projects\Auto_Labelling\Models\Pytorch\cns\detectron2\detectron2\layers\csrc\deformable\deform_conv.h(184): error: identifier "AT_CHECK" is undefined

C:\Users\msjmf59\Documents\Projects\Auto_Labelling\Models\Pytorch\cns\detectron2\detectron2\layers\csrc\deformable\deform_conv.h(234): error: identifier "AT_CHECK" is undefined

C:\Users\msjmf59\Documents\Projects\Auto_Labelling\Models\Pytorch\cns\detectron2\detectron2\layers\csrc\deformable\deform_conv.h(284): error: identifier "AT_CHECK" is undefined

C:\Users\msjmf59\Documents\Projects\Auto_Labelling\Models\Pytorch\cns\detectron2\detectron2\layers\csrc\deformable\deform_conv.h(341): error: identifier "AT_CHECK" is undefined

C:/Users/msjmf59/Documents/Projects/Auto_Labelling/Models/Pytorch/cns/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda.cu(155): error: identifier "AT_CHECK" is undefined

C:/Users/msjmf59/Documents/Projects/Auto_Labelling/Models/Pytorch/cns/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda.cu(338): error: identifier "AT_CHECK" is undefined

C:/Users/msjmf59/Documents/Projects/Auto_Labelling/Models/Pytorch/cns/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda.cu(503): error: identifier "AT_CHECK" is undefined

C:/Users/msjmf59/Documents/Projects/Auto_Labelling/Models/Pytorch/cns/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda.cu(696): error: identifier "AT_CHECK" is undefined

C:/Users/msjmf59/Documents/Projects/Auto_Labelling/Models/Pytorch/cns/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda.cu(823): error: identifier "AT_CHECK" is undefined

C:/Users/msjmf59/Documents/Projects/Auto_Labelling/Models/Pytorch/cns/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda.cu(953): error: identifier "AT_CHECK" is undefined

11 errors detected in the compilation of "C:/Users/msjmf59/AppData/Local/Temp/tmpxft_00000a80_00000000-10_deform_conv_cuda.cpp1.ii".
deform_conv_cuda.cu
ninja: build stopped: subcommand failed.

Thanks a lot!

Update 1:

Use the actual code base of facebook. Details in issue https://github.com/conansherry/detectron2/issues/2#issuecomment-636448829

KangolHsu commented 4 years ago

change file :detectron2\detectron2\layers\csrc\deformable replace all the “AT_CHECK” with “TORCH_CHECK” in deform_conv_cuda.cu and deform_conv.h