Closed Jianqiang-Mei closed 1 year ago
您好,我用的torch1.7.0,在执行sh build_and_install.sh时遇到一些问题, 我的环境如下: RTX3090 torch1.7.0+cu110 torchvision0.8.1+cu110 其他配置和项目指定的相同 错误部分如下: File "/home/mjq/anaconda3/envs/disprcnn/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 482, in unix_wrap_ninja_compile with_cuda=with_cuda) File "/home/mjq/anaconda3/envs/disprcnn/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1238, in _write_ninja_file_and_compile_objects error_prefix='Error compiling objects for extension') File "/home/mjq/anaconda3/envs/disprcnn/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1538, in _run_ninja_build raise RuntimeError(message) from e RuntimeError: Error compiling objects for extension 。。。 。。。 [2/2] c++ -MMD -MF /home/mjq/myproject/disprcnn/disprcnn/modeling/pointnet_module/point_rcnn/lib/utils/roipool3d/build/temp.linux-x86_64-3.7/src/roipool3d.o.d -pthread -B /home/mjq/anaconda3/envs/disprcnn/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/mjq/anaconda3/envs/disprcnn/lib/python3.7/site-packages/torch/include -I/home/mjq/anaconda3/envs/disprcnn/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/mjq/anaconda3/envs/disprcnn/lib/python3.7/site-packages/torch/include/TH -I/home/mjq/anaconda3/envs/disprcnn/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-11.1/include -I/home/mjq/anaconda3/envs/disprcnn/include/python3.7m -c -c /home/mjq/myproject/disprcnn/disprcnn/modeling/pointnet_module/point_rcnn/lib/utils/roipool3d/src/roipool3d.cpp -o /home/mjq/myproject/disprcnn/disprcnn/modeling/pointnet_module/point_rcnn/lib/utils/roipool3d/build/temp.linux-x86_64-3.7/src/roipool3d.o -g -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=roipool3d_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 FAILED: /home/mjq/myproject/disprcnn/disprcnn/modeling/pointnet_module/point_rcnn/lib/utils/roipool3d/build/temp.linux-x86_64-3.7/src/roipool3d.o 。。。 。。。 File "/home/mjq/anaconda3/envs/disprcnn/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1238, in _write_ninja_file_and_compile_objects error_prefix='Error compiling objects for extension') File "/home/mjq/anaconda3/envs/disprcnn/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1538, in _run_ninja_build raise RuntimeError(message) from e RuntimeError: Error compiling objects for extension
您好,我用的torch1.7.0,在执行sh build_and_install.sh时遇到一些问题, 我的环境如下: RTX3090 torch1.7.0+cu110 torchvision0.8.1+cu110 其他配置和项目指定的相同 错误部分如下: File "/home/mjq/anaconda3/envs/disprcnn/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 482, in unix_wrap_ninja_compile with_cuda=with_cuda) File "/home/mjq/anaconda3/envs/disprcnn/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1238, in _write_ninja_file_and_compile_objects error_prefix='Error compiling objects for extension') File "/home/mjq/anaconda3/envs/disprcnn/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1538, in _run_ninja_build raise RuntimeError(message) from e RuntimeError: Error compiling objects for extension 。。。 。。。 [2/2] c++ -MMD -MF /home/mjq/myproject/disprcnn/disprcnn/modeling/pointnet_module/point_rcnn/lib/utils/roipool3d/build/temp.linux-x86_64-3.7/src/roipool3d.o.d -pthread -B /home/mjq/anaconda3/envs/disprcnn/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/mjq/anaconda3/envs/disprcnn/lib/python3.7/site-packages/torch/include -I/home/mjq/anaconda3/envs/disprcnn/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/mjq/anaconda3/envs/disprcnn/lib/python3.7/site-packages/torch/include/TH -I/home/mjq/anaconda3/envs/disprcnn/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-11.1/include -I/home/mjq/anaconda3/envs/disprcnn/include/python3.7m -c -c /home/mjq/myproject/disprcnn/disprcnn/modeling/pointnet_module/point_rcnn/lib/utils/roipool3d/src/roipool3d.cpp -o /home/mjq/myproject/disprcnn/disprcnn/modeling/pointnet_module/point_rcnn/lib/utils/roipool3d/build/temp.linux-x86_64-3.7/src/roipool3d.o -g -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=roipool3d_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 FAILED: /home/mjq/myproject/disprcnn/disprcnn/modeling/pointnet_module/point_rcnn/lib/utils/roipool3d/build/temp.linux-x86_64-3.7/src/roipool3d.o 。。。 。。。 File "/home/mjq/anaconda3/envs/disprcnn/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1238, in _write_ninja_file_and_compile_objects error_prefix='Error compiling objects for extension') File "/home/mjq/anaconda3/envs/disprcnn/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1538, in _run_ninja_build raise RuntimeError(message) from e RuntimeError: Error compiling objects for extension
应该是cuda或者c++代码和pytorch版本不适配了。考虑一下OpenPCDet里的代码,他们应该适配了很高版本的pytorch
好的,我看了好像也是3D点云目标检测的那部分,是网络推理的第三阶段,能给一些更具体的操作吗?谢谢呀
应该是cuda或者c++代码和pytorch版本不适配了。考虑一下OpenPCDet里的代码,他们应该适配了很高版本的pytorch
另外,如果我只想得到第二阶段输出,是不是不需要这部分扩展呀
最好是全部编译好吧。roipool3d报错呢,你就从openpcdet里找相关的代码替换掉试试。
大概理解了,我多多尝试下,谢谢大佬哈哈。
我找到了一个关于pointnet在高版本cuda上编译的解决方案 https://python.iitter.com/other/109460.html 解决了我的问题,希望可以帮助需要的人
cuda11.1应该不需要很多适配。安装nvidia driver和cuda即可。你遇到问题的话可以发上来。