hasanirtiza / Pedestron

[Pedestron] Generalizable Pedestrian Detection: The Elephant In The Room. @ CVPR2021
https://openaccess.thecvf.com/content/CVPR2021/papers/Hasan_Generalizable_Pedestrian_Detection_The_Elephant_in_the_Room_CVPR_2021_paper.pdf
Apache License 2.0
682 stars 159 forks source link

error: identifier "THCudaCheck" is undefined #146

Closed ShadowNinja10 closed 1 year ago

ShadowNinja10 commented 1 year ago

I have cuda 11.0 and cudatoolkit 11.6 version. I am following installation guide properly and also changed all occurrences of AT_CHECK with TORCH_CHECK and while running python setup.py develop I am getting this error:

/home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/setuptools/installer.py:30: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer. SetuptoolsDeprecationWarning, running develop /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/setuptools/command/easy_install.py:147: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools. EasyInstallDeprecationWarning, /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. setuptools.SetuptoolsDeprecationWarning, running egg_info writing mmdet.egg-info/PKG-INFO writing dependency_links to mmdet.egg-info/dependency_links.txt writing requirements to mmdet.egg-info/requires.txt writing top-level names to mmdet.egg-info/top_level.txt /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/utils/cpp_extension.py:411: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend. warnings.warn(msg.format('we could not find ninja.')) reading manifest file 'mmdet.egg-info/SOURCES.txt' adding license file 'LICENSE' writing manifest file 'mmdet.egg-info/SOURCES.txt' running build_ext /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/utils/cpp_extension.py:813: UserWarning: The detected CUDA version (11.0) has a minor version mismatch with the version that was used to compile PyTorch (11.3). Most likely this shouldn't be a problem. warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda)) /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/utils/cpp_extension.py:820: UserWarning: There are no g++ version bounds defined for CUDA version 11.0 warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}') building 'mmdet.ops.roi_align.roi_align_cuda' extension gcc -pthread -B /home/jayesh/anaconda3/envs/open-mmlab/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include -I/home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/TH -I/home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-11.0/include -I/home/jayesh/anaconda3/envs/open-mmlab/include/python3.7m -c mmdet/ops/roi_align/src/roi_align_cuda.cpp -o build/temp.linux-x86_64-cpython-37/mmdet/ops/roi_align/src/roi_align_cuda.o -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=roi_align_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ In file included from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/c10/core/DeviceType.h:8, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/c10/core/Device.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/c10/core/Allocator.h:6, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/ATen/ATen.h:7, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/extension.h:4, from mmdet/ops/roi_align/src/roi_align_cuda.cpp:1: mmdet/ops/roi_align/src/roi_align_cuda.cpp: In function ‘int roi_align_forward_cuda(at::Tensor, at::Tensor, int, int, float, int, at::Tensor)’: mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:42: warning: ‘at::DeprecatedTypeProperties& at::Tensor::type() const’ is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations] 20 | #define CHECK_CUDA(x) TORCH_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ") | ^ /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/c10/macros/Macros.h:205:64: note: in definition of macro ‘C10_UNLIKELY’ 205 | #define C10_UNLIKELY(expr) (builtin_expect(static_cast(expr), 0)) | ^~~~ /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/c10/util/Exception.h:460:7: note: in expansion of macro ‘C10_UNLIKELY_OR_CONST’ 460 | if (C10_UNLIKELY_OR_CONST(!(cond))) { \ | ^~~~~ mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:23: note: in expansion of macro ‘TORCH_CHECK’ 20 | #define CHECK_CUDA(x) TORCH_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ") | ^~~ mmdet/ops/roi_align/src/roi_align_cuda.cpp:24:3: note: in expansion of macro ‘CHECK_CUDA’ 24 | CHECK_CUDA(x); \ | ^~~~~~ mmdet/ops/roi_align/src/roi_align_cuda.cpp:31:3: note: in expansion of macro ‘CHECK_INPUT’ 31 | CHECK_INPUT(features); | ^~~ In file included from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/ATen/core/Tensor.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/ATen/DeviceGuard.h:4, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/ATen/ATen.h:11, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/extension.h:4, from mmdet/ops/roi_align/src/roi_align_cuda.cpp:1: /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/ATen/core/TensorBody.h:213:30: note: declared here 213 | DeprecatedTypeProperties & type() const { | ^~~~ In file included from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/c10/core/DeviceType.h:8, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/c10/core/Device.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/c10/core/Allocator.h:6, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/ATen/ATen.h:7, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/extension.h:4, from mmdet/ops/roi_align/src/roi_align_cuda.cpp:1: mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:42: warning: ‘at::DeprecatedTypeProperties& at::Tensor::type() const’ is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations] 20 | #define CHECK_CUDA(x) TORCH_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ") | ^ /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/c10/macros/Macros.h:205:64: note: in definition of macro ‘C10_UNLIKELY’ 205 | #define C10_UNLIKELY(expr) (__builtin_expect(static_cast(expr), 0)) | ^~~~ /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/c10/util/Exception.h:460:7: note: in expansion of macro ‘C10_UNLIKELY_OR_CONST’ 460 | if (C10_UNLIKELY_OR_CONST(!(cond))) { \ | ^~~~~ mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:23: note: in expansion of macro ‘TORCH_CHECK’ 20 | #define CHECK_CUDA(x) TORCH_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ") | ^~~ mmdet/ops/roi_align/src/roi_align_cuda.cpp:24:3: note: in expansion of macro ‘CHECK_CUDA’ 24 | CHECK_CUDA(x); \ | ^~~~~~ mmdet/ops/roi_align/src/roi_align_cuda.cpp:32:3: note: in expansion of macro ‘CHECK_INPUT’ 32 | CHECK_INPUT(rois); | ^~~ In file included from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/ATen/core/Tensor.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/ATen/DeviceGuard.h:4, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/ATen/ATen.h:11, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/extension.h:4, from mmdet/ops/roi_align/src/roi_align_cuda.cpp:1: /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/ATen/core/TensorBody.h:213:30: note: declared here 213 | DeprecatedTypeProperties & type() const { | ^~~~ In file included from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/c10/core/DeviceType.h:8, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/c10/core/Device.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/c10/core/Allocator.h:6, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/ATen/ATen.h:7, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/extension.h:4, from mmdet/ops/roi_align/src/roi_align_cuda.cpp:1: mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:42: warning: ‘at::DeprecatedTypeProperties& at::Tensor::type() const’ is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations] 20 | #define CHECK_CUDA(x) TORCH_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ") | ^ /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/c10/macros/Macros.h:205:64: note: in definition of macro ‘C10_UNLIKELY’ 205 | #define C10_UNLIKELY(expr) (builtin_expect(static_cast(expr), 0)) | ^~~~ /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/c10/util/Exception.h:460:7: note: in expansion of macro ‘C10_UNLIKELY_OR_CONST’ 460 | if (C10_UNLIKELY_OR_CONST(!(cond))) { \ | ^~~~~ mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:23: note: in expansion of macro ‘TORCH_CHECK’ 20 | #define CHECK_CUDA(x) TORCH_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ") | ^~~ mmdet/ops/roi_align/src/roi_align_cuda.cpp:24:3: note: in expansion of macro ‘CHECK_CUDA’ 24 | CHECK_CUDA(x); \ | ^~~~~~ mmdet/ops/roi_align/src/roi_align_cuda.cpp:33:3: note: in expansion of macro ‘CHECK_INPUT’ 33 | CHECK_INPUT(output); | ^~~ In file included from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/ATen/core/Tensor.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/ATen/DeviceGuard.h:4, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/ATen/ATen.h:11, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/extension.h:4, from mmdet/ops/roi_align/src/roi_align_cuda.cpp:1: /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/ATen/core/TensorBody.h:213:30: note: declared here 213 | DeprecatedTypeProperties & type() const { | ^~~~ In file included from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/c10/core/DeviceType.h:8, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/c10/core/Device.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/c10/core/Allocator.h:6, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/ATen/ATen.h:7, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/extension.h:4, from mmdet/ops/roi_align/src/roi_align_cuda.cpp:1: mmdet/ops/roi_align/src/roi_align_cuda.cpp: In function ‘int roi_align_backward_cuda(at::Tensor, at::Tensor, int, int, float, int, at::Tensor)’: mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:42: warning: ‘at::DeprecatedTypeProperties& at::Tensor::type() const’ is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations] 20 | #define CHECK_CUDA(x) TORCH_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ") | ^ /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/c10/macros/Macros.h:205:64: note: in definition of macro ‘C10_UNLIKELY’ 205 | #define C10_UNLIKELY(expr) (builtin_expect(static_cast(expr), 0)) | ^~~~ /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/c10/util/Exception.h:460:7: note: in expansion of macro ‘C10_UNLIKELY_OR_CONST’ 460 | if (C10_UNLIKELY_OR_CONST(!(cond))) { \ | ^~~~~ mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:23: note: in expansion of macro ‘TORCH_CHECK’ 20 | #define CHECK_CUDA(x) TORCH_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ") | ^~~ mmdet/ops/roi_align/src/roi_align_cuda.cpp:24:3: note: in expansion of macro ‘CHECK_CUDA’ 24 | CHECK_CUDA(x); \ | ^~~~~~ mmdet/ops/roi_align/src/roi_align_cuda.cpp:59:3: note: in expansion of macro ‘CHECK_INPUT’ 59 | CHECK_INPUT(top_grad); | ^~~ In file included from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/ATen/core/Tensor.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/ATen/DeviceGuard.h:4, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/ATen/ATen.h:11, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/extension.h:4, from mmdet/ops/roi_align/src/roi_align_cuda.cpp:1: /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/ATen/core/TensorBody.h:213:30: note: declared here 213 | DeprecatedTypeProperties & type() const { | ^~~~ In file included from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/c10/core/DeviceType.h:8, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/c10/core/Device.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/c10/core/Allocator.h:6, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/ATen/ATen.h:7, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/extension.h:4, from mmdet/ops/roi_align/src/roi_align_cuda.cpp:1: mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:42: warning: ‘at::DeprecatedTypeProperties& at::Tensor::type() const’ is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations] 20 | #define CHECK_CUDA(x) TORCH_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ") | ^ /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/c10/macros/Macros.h:205:64: note: in definition of macro ‘C10_UNLIKELY’ 205 | #define C10_UNLIKELY(expr) (builtin_expect(static_cast(expr), 0)) | ^~~~ /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/c10/util/Exception.h:460:7: note: in expansion of macro ‘C10_UNLIKELY_OR_CONST’ 460 | if (C10_UNLIKELY_OR_CONST(!(cond))) { \ | ^~~~~ mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:23: note: in expansion of macro ‘TORCH_CHECK’ 20 | #define CHECK_CUDA(x) TORCH_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ") | ^~~ mmdet/ops/roi_align/src/roi_align_cuda.cpp:24:3: note: in expansion of macro ‘CHECK_CUDA’ 24 | CHECK_CUDA(x); \ | ^~~~~~ mmdet/ops/roi_align/src/roi_align_cuda.cpp:60:3: note: in expansion of macro ‘CHECK_INPUT’ 60 | CHECK_INPUT(rois); | ^~~ In file included from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/ATen/core/Tensor.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/ATen/DeviceGuard.h:4, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/ATen/ATen.h:11, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/extension.h:4, from mmdet/ops/roi_align/src/roi_align_cuda.cpp:1: /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/ATen/core/TensorBody.h:213:30: note: declared here 213 | DeprecatedTypeProperties & type() const { | ^~~~ In file included from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/c10/core/DeviceType.h:8, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/c10/core/Device.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/c10/core/Allocator.h:6, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/ATen/ATen.h:7, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/extension.h:4, from mmdet/ops/roi_align/src/roi_align_cuda.cpp:1: mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:42: warning: ‘at::DeprecatedTypeProperties& at::Tensor::type() const’ is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations] 20 | #define CHECK_CUDA(x) TORCH_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ") | ^ /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/c10/macros/Macros.h:205:64: note: in definition of macro ‘C10_UNLIKELY’ 205 | #define C10_UNLIKELY(expr) (builtin_expect(static_cast(expr), 0)) | ^~~~ /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/c10/util/Exception.h:460:7: note: in expansion of macro ‘C10_UNLIKELY_OR_CONST’ 460 | if (C10_UNLIKELY_OR_CONST(!(cond))) { \ | ^~~~~ mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:23: note: in expansion of macro ‘TORCH_CHECK’ 20 | #define CHECK_CUDA(x) TORCH_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ") | ^~~ mmdet/ops/roi_align/src/roi_align_cuda.cpp:24:3: note: in expansion of macro ‘CHECK_CUDA’ 24 | CHECK_CUDA(x); \ | ^~~~~~ mmdet/ops/roi_align/src/roi_align_cuda.cpp:61:3: note: in expansion of macro ‘CHECK_INPUT’ 61 | CHECK_INPUT(bottom_grad); | ^~~ In file included from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/ATen/core/Tensor.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/ATen/DeviceGuard.h:4, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/ATen/ATen.h:11, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8, from /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/extension.h:4, from mmdet/ops/roi_align/src/roi_align_cuda.cpp:1: /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/ATen/core/TensorBody.h:213:30: note: declared here 213 | DeprecatedTypeProperties & type() const { | ^~~~ /usr/local/cuda-11.0/bin/nvcc -I/home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include -I/home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/TH -I/home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-11.0/include -I/home/jayesh/anaconda3/envs/open-mmlab/include/python3.7m -c mmdet/ops/roi_align/src/roi_align_kernel.cu -o build/temp.linux-x86_64-cpython-37/mmdet/ops/roi_align/src/roi_align_kernel.o -D__CUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options '-fPIC' -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=roi_align_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_80,code=compute_80 -gencode=arch=compute_80,code=sm_80 -std=c++14 /home/jayesh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/c10/core/SymInt.h(84): warning: integer conversion resulted in a change of sign

mmdet/ops/roi_align/src/roi_align_kernel.cu(145): error: identifier "THCudaCheck" is undefined

mmdet/ops/roi_align/src/roi_align_kernel.cu(292): error: identifier "THCudaCheck" is undefined

2 errors detected in the compilation of "mmdet/ops/roi_align/src/roi_align_kernel.cu". error: command '/usr/local/cuda-11.0/bin/nvcc' failed with exit code 1

VV1314 commented 1 year ago

So why?

wangtingwei1993 commented 10 months ago

I am struggling with the same error, have you find any solution?@VV1314

ShadowNinja10 commented 10 months ago

I am struggling with the same error, have you find any solution?@VV1314

My issue was solved when I used appropriate version of pytorch which was compatible with my cudatoolkit