IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> 开发工具 -> Centerpoint 论文复现中执行bash setup.sh遇到的问题 -> 正文阅读

[开发工具]Centerpoint 论文复现中执行bash setup.sh遇到的问题

Centerpoint 论文复现中执行bash setup.sh遇到的问题

執行bash setup.sh,執行結如下:

(cp2) twilight@ORG: ~/project/cp2/CenterPoint$ bash setup.sh 
running build_ext
building 'deform_conv_cuda' extension
Emitting ninja build file /home/twilight/project/cp2/CenterPoint/det3d/ops/dcn/build/temp.linux-x86_64-3.7/build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/2] /usr/local/cuda/bin/nvcc -DWITH_CUDA -I/home/twilight/anaconda3/envs/cp2/lib/python3.7/site-packages/torch/include -I/home/twilight/anaconda3/envs/cp2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/twilight/anaconda3/envs/cp2/lib/python3.7/site-packages/torch/include/TH -I/home/twilight/anaconda3/envs/cp2/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/twilight/anaconda3/envs/cp2/include/python3.7m -c -c /home/twilight/project/cp2/CenterPoint/det3d/ops/dcn/src/deform_conv_cuda_kernel.cu -o /home/twilight/project/cp2/CenterPoint/det3d/ops/dcn/build/temp.linux-x86_64-3.7/src/deform_conv_cuda_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=deform_conv_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=sm_75 -std=c++14
/home/twilight/project/cp2/CenterPoint/det3d/ops/dcn/src/deform_conv_cuda_kernel.cu: In lambda function:
/home/twilight/project/cp2/CenterPoint/det3d/ops/dcn/src/deform_conv_cuda_kernel.cu:259:247: warning: ‘T* at::Tensor::data() const [with T = double]’ is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
   AT_DISPATCH_FLOATING_TYPES_AND_HALF(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         ^
/home/twilight/anaconda3/envs/cp2/lib/python3.7/site-packages/torch/include/ATen/core/TensorBody.h:363:1: note: declared here
   T * data() const {
 ^ ~~
/home/twilight/project/cp2/CenterPoint/det3d/ops/dcn/src/deform_conv_cuda_kernel.cu:846:2216: warning: ‘T* at::Tensor::data() const [with T = c10::Half]’ is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
   AT_DISPATCH_FLOATING_TYPES_AND_HALF(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ^
/home/twilight/anaconda3/envs/cp2/lib/python3.7/site-packages/torch/include/ATen/core/TensorBody.h:363:1: note: declared here
   T * data() const {
 ^ ~~
/home/twilight/project/cp2/CenterPoint/det3d/ops/dcn/src/deform_conv_cuda_kernel.cu:846:2278: warning: ‘T* at::Tensor::data() const [with T = c10::Half]’ is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
   AT_DISPATCH_FLOATING_TYPES_AND_HALF(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ^
/home/twilight/anaconda3/envs/cp2/lib/python3.7/site-packages/torch/include/ATen/core/TensorBody.h:363:1: note: declared here
   T * data() const {
 ^ ~~
...
...
...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ^
/home/twilight/anaconda3/envs/cp2/lib/python3.7/site-packages/torch/include/ATen/core/TensorBody.h:363:1: note: declared here
   T * data() const {
 ^ ~~
[2/2] c++ -MMD -MF /home/twilight/project/cp2/CenterPoint/det3d/ops/dcn/build/temp.linux-x86_64-3.7/src/deform_conv_cuda.o.d -pthread -B /home/twilight/anaconda3/envs/cp2/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/twilight/anaconda3/envs/cp2/lib/python3.7/site-packages/torch/include -I/home/twilight/anaconda3/envs/cp2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/twilight/anaconda3/envs/cp2/lib/python3.7/site-packages/torch/include/TH -I/home/twilight/anaconda3/envs/cp2/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/twilight/anaconda3/envs/cp2/include/python3.7m -c -c /home/twilight/project/cp2/CenterPoint/det3d/ops/dcn/src/deform_conv_cuda.cpp -o /home/twilight/project/cp2/CenterPoint/det3d/ops/dcn/build/temp.linux-x86_64-3.7/src/deform_conv_cuda.o -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=deform_conv_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
FAILED: /home/twilight/project/cp2/CenterPoint/det3d/ops/dcn/build/temp.linux-x86_64-3.7/src/deform_conv_cuda.o 
c++ -MMD -MF /home/twilight/project/cp2/CenterPoint/det3d/ops/dcn/build/temp.linux-x86_64-3.7/src/deform_conv_cuda.o.d -pthread -B /home/twilight/anaconda3/envs/cp2/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/twilight/anaconda3/envs/cp2/lib/python3.7/site-packages/torch/include -I/home/twilight/anaconda3/envs/cp2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/twilight/anaconda3/envs/cp2/lib/python3.7/site-packages/torch/include/TH -I/home/twilight/anaconda3/envs/cp2/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/twilight/anaconda3/envs/cp2/include/python3.7m -c -c /home/twilight/project/cp2/CenterPoint/det3d/ops/dcn/src/deform_conv_cuda.cpp -o /home/twilight/project/cp2/CenterPoint/det3d/ops/dcn/build/temp.linux-x86_64-3.7/src/deform_conv_cuda.o -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=deform_conv_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/twilight/anaconda3/envs/cp2/lib/python3.7/site-packages/torch/include/ATen/Parallel.h:149:0,
                 from /home/twilight/anaconda3/envs/cp2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/utils.h:3,
                 from /home/twilight/anaconda3/envs/cp2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:5,
                 from /home/twilight/anaconda3/envs/cp2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/nn.h:3,
                 from /home/twilight/anaconda3/envs/cp2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:12,
                 from /home/twilight/anaconda3/envs/cp2/lib/python3.7/site-packages/torch/include/torch/extension.h:4,
                 from /home/twilight/project/cp2/CenterPoint/det3d/ops/dcn/src/deform_conv_cuda.cpp:4:
/home/twilight/anaconda3/envs/cp2/lib/python3.7/site-packages/torch/include/ATen/ParallelOpenMP.h:84:0: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]
 #pragma omp parallel for if ((end - begin) >= grain_size)
 
/home/twilight/project/cp2/CenterPoint/det3d/ops/dcn/src/deform_conv_cuda.cpp: In function ‘void shape_check(at::Tensor, at::Tensor, at::Tensor*, at::Tensor, int, int, int, int, int, int, int, int, int, int)’:
/home/twilight/project/cp2/CenterPoint/det3d/ops/dcn/src/deform_conv_cuda.cpp:66:3: ***error:*** ‘AT_CHECK’ was not declared in this scope
   AT_CHECK(weight.ndimension() == 4,
   ^~~~~~~~
/home/twilight/project/cp2/CenterPoint/det3d/ops/dcn/src/deform_conv_cuda.cpp:66:3: note: suggested alternative: ‘DCHECK’
   AT_CHECK(weight.ndimension() == 4,
   ^~~~~~~~
   DCHECK
/home/twilight/project/cp2/CenterPoint/det3d/ops/dcn/src/deform_conv_cuda.cpp: In function ‘int deform_conv_forward_cuda(at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor, int, int, int, int, int, int, int, int, int, int, int)’:
/home/twilight/project/cp2/CenterPoint/det3d/ops/dcn/src/deform_conv_cuda.cpp:194:3: ***error:*** ‘AT_CHECK’ was not declared in this scope
   AT_CHECK((offset.size(0) == batchSize), "invalid batch size of offset");
   ^~~~~~~~
/home/twilight/project/cp2/CenterPoint/det3d/ops/dcn/src/deform_conv_cuda.cpp:194:3: note: suggested alternative: ‘DCHECK’
   AT_CHECK((offset.size(0) == batchSize), "invalid batch size of offset");
   ^~~~~~~~
   DCHECK
/home/twilight/project/cp2/CenterPoint/det3d/ops/dcn/src/deform_conv_cuda.cpp: In function ‘int deform_conv_backward_input_cuda(at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor, int, int, int, int, int, int, int, int, int, int, int)’:
/home/twilight/project/cp2/CenterPoint/det3d/ops/dcn/src/deform_conv_cuda.cpp:301:3: ***error:*** ‘AT_CHECK’ was not declared in this scope
   AT_CHECK((offset.size(0) == batchSize), 3, "invalid batch size of offset");
   ^~~~~~~~
/home/twilight/project/cp2/CenterPoint/det3d/ops/dcn/src/deform_conv_cuda.cpp:301:3: note: suggested alternative: ‘DCHECK’
   AT_CHECK((offset.size(0) == batchSize), 3, "invalid batch size of offset");
   ^~~~~~~~
   DCHECK
/home/twilight/project/cp2/CenterPoint/det3d/ops/dcn/src/deform_conv_cuda.cpp: In function ‘int deform_conv_backward_parameters_cuda(at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor, int, int, int, int, int, int, int, int, int, int, float, int)’:
/home/twilight/project/cp2/CenterPoint/det3d/ops/dcn/src/deform_conv_cuda.cpp:417:3: ***error***: ‘AT_CHECK’ was not declared in this scope
   AT_CHECK((offset.size(0) == batchSize), "invalid batch size of offset");
   ^~~~~~~~
/home/twilight/project/cp2/CenterPoint/det3d/ops/dcn/src/deform_conv_cuda.cpp:417:3: note: suggested alternative: ‘DCHECK’
   AT_CHECK((offset.size(0) == batchSize), "invalid batch size of offset");
   ^~~~~~~~
   DCHECK
/home/twilight/project/cp2/CenterPoint/det3d/ops/dcn/src/deform_conv_cuda.cpp: In function ‘void modulated_deform_conv_cuda_forward(at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor, int, int, int, int, int, int, int, int, int, int, bool)’:
/home/twilight/project/cp2/CenterPoint/det3d/ops/dcn/src/deform_conv_cuda.cpp:497:3: error: ‘AT_CHECK’ was not declared in this scope
   AT_CHECK(input.is_contiguous(), "input tensor has to be contiguous");
   ^~~~~~~~
/home/twilight/project/cp2/CenterPoint/det3d/ops/dcn/src/deform_conv_cuda.cpp:497:3: note: suggested alternative: ‘DCHECK’
   AT_CHECK(input.is_contiguous(), "input tensor has to be contiguous");
   ^~~~~~~~
   DCHECK
/home/twilight/project/cp2/CenterPoint/det3d/ops/dcn/src/deform_conv_cuda.cpp: In function ‘void modulated_deform_conv_cuda_backward(at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor, int, int, int, int, int, int, int, int, int, int, bool)’:
/home/twilight/project/cp2/CenterPoint/det3d/ops/dcn/src/deform_conv_cuda.cpp:579:3: error: ‘AT_CHECK’ was not declared in this scope
   AT_CHECK(input.is_contiguous(), "input tensor has to be contiguous");
   ^~~~~~~~
/home/twilight/project/cp2/CenterPoint/det3d/ops/dcn/src/deform_conv_cuda.cpp:579:3: note: suggested alternative: ‘DCHECK’
   AT_CHECK(input.is_contiguous(), "input tensor has to be contiguous");
   ^~~~~~~~
   DCHECK
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "/home/twilight/anaconda3/envs/cp2/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1539, in _run_ninja_build
    env=env)
  File "/home/twilight/anaconda3/envs/cp2/lib/python3.7/subprocess.py", line 512, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "setup.py", line 19, in <module>
    cmdclass={'build_ext': BuildExtension})
  File "/home/twilight/anaconda3/envs/cp2/lib/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
。。。
。。。
.。。

    with_cuda=with_cuda)
  File "/home/twilight/anaconda3/envs/cp2/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1255, in _write_ninja_file_and_compile_objects
    error_prefix='Error compiling objects for extension')
  File "/home/twilight/anaconda3/envs/cp2/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1555, in _run_ninja_build
    raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension
running build_ext
building 'iou3d_nms_cuda' extension
Emitting ninja build file /home/twilight/project/cp2/CenterPoint/det3d/ops/iou3d_nms/build/temp.linux-x86_64-3.7/build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/4] /usr/local/cuda/bin/nvcc -I/home/twilight/anaconda3/envs/cp2/lib/python3.7/site-packages/torch/include -I/home/twilight/anaconda3/envs/cp2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/twilight/anaconda3/envs/cp2/lib/python3.7/site-packages/torch/include/TH -I/home/twilight/anaconda3/envs/cp2/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/twilight/anaconda3/envs/cp2/include/python3.7m -c -c /home/twilight/project/cp2/CenterPoint/det3d/ops/iou3d_nms/src/iou3d_nms_kernel.cu -o /home/twilight/project/cp2/CenterPoint/det3d/ops/iou3d_nms/build/temp.linux-x86_64-3.7/src/iou3d_nms_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O2 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=iou3d_nms_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=sm_75 -std=c++14

执行結果非常長,报错很多,而且bash中沒标红,所以error比较隐蔽。处理:复制在vscode中,通過find查找出來的。
可以看出,报错有如下几个:

1./home/twilight/project/cp2/CenterPoint/det3d/ops/dcn/src/deform_conv_cuda.cpp:66:3: ***error:*** ‘AT_CHECK’ was not declared in this scope

2.subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

3.RuntimeError: Error compiling objects for extension
running build_ext

处理:
复制 /CenterPoint/det3d/ops/dcn/src/deform_conv_cuda.cpp:66:3: error: ‘AT_CHECK’ was not declared in this scope google(百度里找不到,所还是google yyds),找到了Centerpoint作者在github上的回复:
https://github.com/open-mmlab/mmediting/issues/84

在这里插入图片描述

因此得到解决办法:
将deform_conv_cuda.cpp 和deform_pool_cuda.cpp 这两个文件中的"AT_CHECK" 都替换成"TORCH _CHECK " 。

在https://github.com/open-mmlab/mmediting/issues/84中也可以得到这个问题的解答。这个问题是装det3D中的dcn的库的所产生的问题。

  开发工具 最新文章
Postman接口测试之Mock快速入门
ASCII码空格替换查表_最全ASCII码对照表0-2
如何使用 ssh 建立 socks 代理
Typora配合PicGo阿里云图床配置
SoapUI、Jmeter、Postman三种接口测试工具的
github用相对路径显示图片_GitHub 中 readm
Windows编译g2o及其g2o viewer
解决jupyter notebook无法连接/ jupyter连接
Git恢复到之前版本
VScode常用快捷键
上一篇文章      下一篇文章      查看所有文章
加:2021-08-01 14:42:21  更:2021-08-01 14:42:58 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年12日历 -2024/12/22 18:21:27-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码