-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python setup.py develop error #73
Comments
I have the same problem, how do you solve it? thx @BryantGao |
the version of gcc is not matched with the CUDA or Ubuntu. |
I have the same problem, have you solved it? @BryantGao @LiuXiang199x |
I have the same problem too. |
Replace all the AT_CHECK with TORCH_CHECK |
|
Hi!
When I use python3.6.13 torch 1.10.0 and CUDA 11.3 and python setup.py develop
/home/cv/.local/lib/python3.6/site-packages/setuptools/installer.py:30: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
SetuptoolsDeprecationWarning,
/home/cv/.local/lib/python3.6/site-packages/setuptools/dist.py:493: UserWarning: Normalizing '1.0.rc0+unknown' to '1.0rc0+unknown'
warnings.warn(tmpl.format(**locals()))
running develop
/home/cv/.local/lib/python3.6/site-packages/setuptools/command/easy_install.py:159: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
EasyInstallDeprecationWarning,
/home/cv/.local/lib/python3.6/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/cv/.local/lib/python3.6/site-packages/torch/utils/cpp_extension.py:381: 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
building 'mmdet.ops.roi_align.roi_align_cuda' extension
gcc -pthread -B /home/D1/miniconda3/envs/open-mmlab/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/cv/.local/lib/python3.6/site-packages/torch/include -I/home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/cv/.local/lib/python3.6/site-packages/torch/include/TH -I/home/cv/.local/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda-11.3/include -I/home/D1/miniconda3/envs/open-mmlab/include/python3.6m -c mmdet/ops/roi_align/src/roi_align_cuda.cpp -o build/temp.linux-x86_64-3.6/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++
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:39: 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]
#define CHECK_CUDA(x) AT_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’
CHECK_CUDA(x);
^~~~~~~~~~
mmdet/ops/roi_align/src/roi_align_cuda.cpp:31:3: note: in expansion of macro ‘CHECK_INPUT’
CHECK_INPUT(features);
^
In file included from /home/cv/.local/lib/python3.6/site-packages/torch/include/ATen/Tensor.h:3:0,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/ATen/Context.h:4,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/ATen/ATen.h:9,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/extension.h:4,
from mmdet/ops/roi_align/src/roi_align_cuda.cpp:1:
/home/cv/.local/lib/python3.6/site-packages/torch/include/ATen/core/TensorBody.h:194:30: note: declared here
DeprecatedTypeProperties & type() const {
^~~~
mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:23: error: ‘AT_CHECK’ was not declared in this scope
#define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")
^
mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:23: note: in definition of macro ‘CHECK_CUDA’
#define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")
^~~~~~~~
mmdet/ops/roi_align/src/roi_align_cuda.cpp:31:3: note: in expansion of macro ‘CHECK_INPUT’
CHECK_INPUT(features);
^
mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:23: note: suggested alternative: ‘DCHECK’
#define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")
^
mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:23: note: in definition of macro ‘CHECK_CUDA’
#define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")
^~~~~~~~
mmdet/ops/roi_align/src/roi_align_cuda.cpp:31:3: note: in expansion of macro ‘CHECK_INPUT’
CHECK_INPUT(features);
^
mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:39: 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]
#define CHECK_CUDA(x) AT_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’
CHECK_CUDA(x);
^~~~~~~~~~
mmdet/ops/roi_align/src/roi_align_cuda.cpp:32:3: note: in expansion of macro ‘CHECK_INPUT’
CHECK_INPUT(rois);
^
In file included from /home/cv/.local/lib/python3.6/site-packages/torch/include/ATen/Tensor.h:3:0,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/ATen/Context.h:4,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/ATen/ATen.h:9,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/extension.h:4,
from mmdet/ops/roi_align/src/roi_align_cuda.cpp:1:
/home/cv/.local/lib/python3.6/site-packages/torch/include/ATen/core/TensorBody.h:194:30: note: declared here
DeprecatedTypeProperties & type() const {
^~~~
mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:39: 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]
#define CHECK_CUDA(x) AT_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’
CHECK_CUDA(x);
^~~~~~~~~~
mmdet/ops/roi_align/src/roi_align_cuda.cpp:33:3: note: in expansion of macro ‘CHECK_INPUT’
CHECK_INPUT(output);
^
In file included from /home/cv/.local/lib/python3.6/site-packages/torch/include/ATen/Tensor.h:3:0,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/ATen/Context.h:4,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/ATen/ATen.h:9,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/extension.h:4,
from mmdet/ops/roi_align/src/roi_align_cuda.cpp:1:
/home/cv/.local/lib/python3.6/site-packages/torch/include/ATen/core/TensorBody.h:194:30: note: declared here
DeprecatedTypeProperties & type() const {
^~~~
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:39: 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]
#define CHECK_CUDA(x) AT_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’
CHECK_CUDA(x);
^~~~~~~~~~
mmdet/ops/roi_align/src/roi_align_cuda.cpp:59:3: note: in expansion of macro ‘CHECK_INPUT’
CHECK_INPUT(top_grad);
^
In file included from /home/cv/.local/lib/python3.6/site-packages/torch/include/ATen/Tensor.h:3:0,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/ATen/Context.h:4,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/ATen/ATen.h:9,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/extension.h:4,
from mmdet/ops/roi_align/src/roi_align_cuda.cpp:1:
/home/cv/.local/lib/python3.6/site-packages/torch/include/ATen/core/TensorBody.h:194:30: note: declared here
DeprecatedTypeProperties & type() const {
^~~~
mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:23: error: ‘AT_CHECK’ was not declared in this scope
#define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")
^
mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:23: note: in definition of macro ‘CHECK_CUDA’
#define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")
^~~~~~~~
mmdet/ops/roi_align/src/roi_align_cuda.cpp:59:3: note: in expansion of macro ‘CHECK_INPUT’
CHECK_INPUT(top_grad);
^
mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:23: note: suggested alternative: ‘DCHECK’
#define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")
^
mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:23: note: in definition of macro ‘CHECK_CUDA’
#define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")
^~~~~~~~
mmdet/ops/roi_align/src/roi_align_cuda.cpp:59:3: note: in expansion of macro ‘CHECK_INPUT’
CHECK_INPUT(top_grad);
^
mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:39: 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]
#define CHECK_CUDA(x) AT_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’
CHECK_CUDA(x);
^~~~~~~~~~
mmdet/ops/roi_align/src/roi_align_cuda.cpp:60:3: note: in expansion of macro ‘CHECK_INPUT’
CHECK_INPUT(rois);
^
In file included from /home/cv/.local/lib/python3.6/site-packages/torch/include/ATen/Tensor.h:3:0,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/ATen/Context.h:4,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/ATen/ATen.h:9,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/extension.h:4,
from mmdet/ops/roi_align/src/roi_align_cuda.cpp:1:
/home/cv/.local/lib/python3.6/site-packages/torch/include/ATen/core/TensorBody.h:194:30: note: declared here
DeprecatedTypeProperties & type() const {
^~~~
mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:39: 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]
#define CHECK_CUDA(x) AT_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’
CHECK_CUDA(x);
^~~~~~~~~~
mmdet/ops/roi_align/src/roi_align_cuda.cpp:61:3: note: in expansion of macro ‘CHECK_INPUT’
CHECK_INPUT(bottom_grad);
^
In file included from /home/cv/.local/lib/python3.6/site-packages/torch/include/ATen/Tensor.h:3:0,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/ATen/Context.h:4,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/ATen/ATen.h:9,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8,
from /home/cv/.local/lib/python3.6/site-packages/torch/include/torch/extension.h:4,
from mmdet/ops/roi_align/src/roi_align_cuda.cpp:1:
/home/cv/.local/lib/python3.6/site-packages/torch/include/ATen/core/TensorBody.h:194:30: note: declared here
DeprecatedTypeProperties & type() const {
^~~~
error: command 'gcc' failed with exit status 1
Thanks.
The text was updated successfully, but these errors were encountered: