skyhehe123 / SA-SSD

SA-SSD: Structure Aware Single-stage 3D Object Detection from Point Cloud (CVPR 2020)
492 stars 106 forks source link

setup.py build_ext fail #52

Open zhixiongzh opened 4 years ago

zhixiongzh commented 4 years ago

When I run python3 setup.py build_ext --inplace running build_ext I met such errors. Can anybody help me how to fix this problem? My cuda =10.2,pytorch=1.5,spconv=1.2 `shawn@shawn-HP:~/SA-SSD/mmdet/ops/iou3d$ python3 setup.py build_ext --inplace running build_ext /home/shawn/.local/lib/python3.6/site-packages/torch/utils/cpp_extension.py:305: 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.')) building 'iou3d_cuda' extension creating build creating build/temp.linux-x86_64-3.6 creating build/temp.linux-x86_64-3.6/src x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/shawn/.local/lib/python3.6/site-packages/torch/include -I/home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/shawn/.local/lib/python3.6/site-packages/torch/include/TH -I/home/shawn/.local/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.6m -c src/iou3d.cpp -o build/temp.linux-x86_64-3.6/src/iou3d.o -g -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=iou3d_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 src/iou3d.cpp: In function ‘int boxes_overlap_bev_gpu(at::Tensor, at::Tensor, at::Tensor)’: src/iou3d.cpp:7: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 ")

                                   ^

src/iou3d.cpp:9:24: note: in expansion of macro ‘CHECK_CUDA’

define CHECK_INPUT(x) CHECK_CUDA(x);CHECK_CONTIGUOUS(x)

                    ^~~~~~~~~~

src/iou3d.cpp:36:5: note: in expansion of macro ‘CHECK_INPUT’ CHECK_INPUT(boxes_a); ^ In file included from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/Tensor.h:11:0, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/Context.h:4, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/ATen.h:5, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/input-archive.h:6, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/archive.h:3, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/tensor.h:3, from src/iou3d.cpp:1: /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/core/TensorBody.h:262:30: note: declared here DeprecatedTypeProperties & type() const { ^~~~ src/iou3d.cpp:7: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 ")

                   ^

src/iou3d.cpp:7:23: note: in definition of macro ‘CHECK_CUDA’

define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")

                   ^~~~~~~~

src/iou3d.cpp:36:5: note: in expansion of macro ‘CHECK_INPUT’ CHECK_INPUT(boxes_a); ^ src/iou3d.cpp:7:23: note: suggested alternative: ‘DCHECK’

define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")

                   ^

src/iou3d.cpp:7:23: note: in definition of macro ‘CHECK_CUDA’

define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")

                   ^~~~~~~~

src/iou3d.cpp:36:5: note: in expansion of macro ‘CHECK_INPUT’ CHECK_INPUT(boxes_a); ^ src/iou3d.cpp:7: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 ")

                                   ^

src/iou3d.cpp:9:24: note: in expansion of macro ‘CHECK_CUDA’

define CHECK_INPUT(x) CHECK_CUDA(x);CHECK_CONTIGUOUS(x)

                    ^~~~~~~~~~

src/iou3d.cpp:37:5: note: in expansion of macro ‘CHECK_INPUT’ CHECK_INPUT(boxes_b); ^ In file included from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/Tensor.h:11:0, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/Context.h:4, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/ATen.h:5, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/input-archive.h:6, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/archive.h:3, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/tensor.h:3, from src/iou3d.cpp:1: /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/core/TensorBody.h:262:30: note: declared here DeprecatedTypeProperties & type() const { ^~~~ src/iou3d.cpp:7: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 ")

                                   ^

src/iou3d.cpp:9:24: note: in expansion of macro ‘CHECK_CUDA’

define CHECK_INPUT(x) CHECK_CUDA(x);CHECK_CONTIGUOUS(x)

                    ^~~~~~~~~~

src/iou3d.cpp:38:5: note: in expansion of macro ‘CHECK_INPUT’ CHECK_INPUT(ans_overlap); ^ In file included from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/Tensor.h:11:0, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/Context.h:4, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/ATen.h:5, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/input-archive.h:6, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/archive.h:3, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/tensor.h:3, from src/iou3d.cpp:1: /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/core/TensorBody.h:262:30: note: declared here DeprecatedTypeProperties & type() const { ^~~~ src/iou3d.cpp:43:54: warning: ‘T at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations] const float boxes_a_data = boxes_a.data(); ^ In file included from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/Tensor.h:11:0, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/Context.h:4, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/ATen.h:5, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/input-archive.h:6, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/archive.h:3, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/tensor.h:3, from src/iou3d.cpp:1: /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/core/TensorBody.h:341:7: note: declared here T data() const { ^~~~ src/iou3d.cpp:44:54: warning: ‘T at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations] const float boxes_b_data = boxes_b.data(); ^ In file included from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/Tensor.h:11:0, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/Context.h:4, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/ATen.h:5, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/input-archive.h:6, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/archive.h:3, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/tensor.h:3, from src/iou3d.cpp:1: /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/core/TensorBody.h:341:7: note: declared here T data() const { ^~~~ src/iou3d.cpp:45:56: warning: ‘T at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations] float ans_overlap_data = ans_overlap.data(); ^ In file included from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/Tensor.h:11:0, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/Context.h:4, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/ATen.h:5, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/input-archive.h:6, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/archive.h:3, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/tensor.h:3, from src/iou3d.cpp:1: /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/core/TensorBody.h:341:7: note: declared here T * data() const { ^~~~ src/iou3d.cpp: In function ‘int boxes_iou_bev_gpu(at::Tensor, at::Tensor, at::Tensor)’: src/iou3d.cpp:7: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 ")

                                   ^

src/iou3d.cpp:9:24: note: in expansion of macro ‘CHECK_CUDA’

define CHECK_INPUT(x) CHECK_CUDA(x);CHECK_CONTIGUOUS(x)

                    ^~~~~~~~~~

src/iou3d.cpp:57:5: note: in expansion of macro ‘CHECK_INPUT’ CHECK_INPUT(boxes_a); ^ In file included from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/Tensor.h:11:0, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/Context.h:4, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/ATen.h:5, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/input-archive.h:6, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/archive.h:3, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/tensor.h:3, from src/iou3d.cpp:1: /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/core/TensorBody.h:262:30: note: declared here DeprecatedTypeProperties & type() const { ^~~~ src/iou3d.cpp:7: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 ")

                   ^

src/iou3d.cpp:7:23: note: in definition of macro ‘CHECK_CUDA’

define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")

                   ^~~~~~~~

src/iou3d.cpp:57:5: note: in expansion of macro ‘CHECK_INPUT’ CHECK_INPUT(boxes_a); ^ src/iou3d.cpp:7:23: note: suggested alternative: ‘DCHECK’

define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")

                   ^

src/iou3d.cpp:7:23: note: in definition of macro ‘CHECK_CUDA’

define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")

                   ^~~~~~~~

src/iou3d.cpp:57:5: note: in expansion of macro ‘CHECK_INPUT’ CHECK_INPUT(boxes_a); ^ src/iou3d.cpp:7: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 ")

                                   ^

src/iou3d.cpp:9:24: note: in expansion of macro ‘CHECK_CUDA’

define CHECK_INPUT(x) CHECK_CUDA(x);CHECK_CONTIGUOUS(x)

                    ^~~~~~~~~~

src/iou3d.cpp:58:5: note: in expansion of macro ‘CHECK_INPUT’ CHECK_INPUT(boxes_b); ^ In file included from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/Tensor.h:11:0, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/Context.h:4, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/ATen.h:5, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/input-archive.h:6, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/archive.h:3, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/tensor.h:3, from src/iou3d.cpp:1: /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/core/TensorBody.h:262:30: note: declared here DeprecatedTypeProperties & type() const { ^~~~ src/iou3d.cpp:7: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 ")

                                   ^

src/iou3d.cpp:9:24: note: in expansion of macro ‘CHECK_CUDA’

define CHECK_INPUT(x) CHECK_CUDA(x);CHECK_CONTIGUOUS(x)

                    ^~~~~~~~~~

src/iou3d.cpp:59:5: note: in expansion of macro ‘CHECK_INPUT’ CHECK_INPUT(ans_iou); ^ In file included from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/Tensor.h:11:0, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/Context.h:4, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/ATen.h:5, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/input-archive.h:6, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/archive.h:3, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/tensor.h:3, from src/iou3d.cpp:1: /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/core/TensorBody.h:262:30: note: declared here DeprecatedTypeProperties & type() const { ^~~~ src/iou3d.cpp:64:54: warning: ‘T at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations] const float boxes_a_data = boxes_a.data(); ^ In file included from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/Tensor.h:11:0, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/Context.h:4, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/ATen.h:5, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/input-archive.h:6, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/archive.h:3, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/tensor.h:3, from src/iou3d.cpp:1: /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/core/TensorBody.h:341:7: note: declared here T data() const { ^~~~ src/iou3d.cpp:65:54: warning: ‘T at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations] const float boxes_b_data = boxes_b.data(); ^ In file included from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/Tensor.h:11:0, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/Context.h:4, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/ATen.h:5, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/input-archive.h:6, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/archive.h:3, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/tensor.h:3, from src/iou3d.cpp:1: /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/core/TensorBody.h:341:7: note: declared here T data() const { ^~~~ src/iou3d.cpp:66:48: warning: ‘T at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations] float ans_iou_data = ans_iou.data(); ^ In file included from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/Tensor.h:11:0, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/Context.h:4, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/ATen.h:5, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/input-archive.h:6, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/archive.h:3, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/tensor.h:3, from src/iou3d.cpp:1: /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/core/TensorBody.h:341:7: note: declared here T * data() const { ^~~~ src/iou3d.cpp: In function ‘int nms_gpu(at::Tensor, at::Tensor, float)’: src/iou3d.cpp:7: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 ")

                                   ^

src/iou3d.cpp:9:24: note: in expansion of macro ‘CHECK_CUDA’

define CHECK_INPUT(x) CHECK_CUDA(x);CHECK_CONTIGUOUS(x)

                    ^~~~~~~~~~

src/iou3d.cpp:77:5: note: in expansion of macro ‘CHECK_INPUT’ CHECK_INPUT(boxes); ^ In file included from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/Tensor.h:11:0, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/Context.h:4, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/ATen.h:5, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/input-archive.h:6, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/archive.h:3, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/tensor.h:3, from src/iou3d.cpp:1: /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/core/TensorBody.h:262:30: note: declared here DeprecatedTypeProperties & type() const { ^~~~ src/iou3d.cpp:7: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 ")

                   ^

src/iou3d.cpp:7:23: note: in definition of macro ‘CHECK_CUDA’

define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")

                   ^~~~~~~~

src/iou3d.cpp:77:5: note: in expansion of macro ‘CHECK_INPUT’ CHECK_INPUT(boxes); ^ src/iou3d.cpp:7:23: note: suggested alternative: ‘DCHECK’

define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")

                   ^

src/iou3d.cpp:7:23: note: in definition of macro ‘CHECK_CUDA’

define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")

                   ^~~~~~~~

src/iou3d.cpp:77:5: note: in expansion of macro ‘CHECK_INPUT’ CHECK_INPUT(boxes); ^ src/iou3d.cpp:81:50: warning: ‘T at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations] const float boxes_data = boxes.data(); ^ In file included from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/Tensor.h:11:0, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/Context.h:4, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/ATen.h:5, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/input-archive.h:6, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/archive.h:3, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/tensor.h:3, from src/iou3d.cpp:1: /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/core/TensorBody.h:341:7: note: declared here T data() const { ^~~~ src/iou3d.cpp:82:40: warning: ‘T at::Tensor::data() const [with T = long int]’ is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations] long keep_data = keep.data(); ^ In file included from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/Tensor.h:11:0, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/Context.h:4, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/ATen.h:5, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/input-archive.h:6, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/archive.h:3, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/tensor.h:3, from src/iou3d.cpp:1: /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/core/TensorBody.h:341:7: note: declared here T data() const { ^~~~ src/iou3d.cpp: In function ‘int nms_normal_gpu(at::Tensor, at::Tensor, float)’: src/iou3d.cpp:7: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 ")

                                   ^

src/iou3d.cpp:9:24: note: in expansion of macro ‘CHECK_CUDA’

define CHECK_INPUT(x) CHECK_CUDA(x);CHECK_CONTIGUOUS(x)

                    ^~~~~~~~~~

src/iou3d.cpp:127:5: note: in expansion of macro ‘CHECK_INPUT’ CHECK_INPUT(boxes); ^ In file included from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/Tensor.h:11:0, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/Context.h:4, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/ATen.h:5, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/input-archive.h:6, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/archive.h:3, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/tensor.h:3, from src/iou3d.cpp:1: /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/core/TensorBody.h:262:30: note: declared here DeprecatedTypeProperties & type() const { ^~~~ src/iou3d.cpp:7: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 ")

                   ^

src/iou3d.cpp:7:23: note: in definition of macro ‘CHECK_CUDA’

define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")

                   ^~~~~~~~

src/iou3d.cpp:127:5: note: in expansion of macro ‘CHECK_INPUT’ CHECK_INPUT(boxes); ^ src/iou3d.cpp:7:23: note: suggested alternative: ‘DCHECK’

define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")

                   ^

src/iou3d.cpp:7:23: note: in definition of macro ‘CHECK_CUDA’

define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")

                   ^~~~~~~~

src/iou3d.cpp:127:5: note: in expansion of macro ‘CHECK_INPUT’ CHECK_INPUT(boxes); ^ src/iou3d.cpp:131:50: warning: ‘T at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations] const float boxes_data = boxes.data(); ^ In file included from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/Tensor.h:11:0, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/Context.h:4, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/ATen.h:5, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/input-archive.h:6, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/archive.h:3, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/tensor.h:3, from src/iou3d.cpp:1: /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/core/TensorBody.h:341:7: note: declared here T data() const { ^~~~ src/iou3d.cpp:132:40: warning: ‘T at::Tensor::data() const [with T = long int]’ is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations] long keep_data = keep.data(); ^ In file included from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/Tensor.h:11:0, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/Context.h:4, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/ATen.h:5, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/input-archive.h:6, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/archive.h:3, from /home/shawn/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/serialize/tensor.h:3, from src/iou3d.cpp:1: /home/shawn/.local/lib/python3.6/site-packages/torch/include/ATen/core/TensorBody.h:341:7: note: declared here T data() const { ^~~~ error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 `

Royaler commented 4 years ago

maybe the version of pytorch?