clinplayer / Point2Skeleton

Point2Skeleton: Learning Skeletal Representations from Point Clouds (CVPR2021)
MIT License
211 stars 38 forks source link

A new question about installing the Pointnet++ #14

Closed AceSilent closed 2 years ago

AceSilent commented 2 years ago

When I run the command:sudo python setup.py build_ext --inplace

feedback is as follows:

running build_ext building '_ext-src' extension x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/home/zhang/.local/lib/python3.7/site-packages/torch/include -I/home/zhang/.local/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/zhang/.local/lib/python3.7/site-packages/torch/include/TH -I/home/zhang/.local/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.7m -c _ext-src/src/ball_query.cpp -o build/temp.linux-x86_64-3.7/_ext-src/src/ball_query.o -O2 -I_ext-src/include -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_ext-src -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 In file included from _ext-src/src/ball_query.cpp:2:0: _ext-src/include/utils.h:21:56: warning: backslash-newline at end of file

define CHECK_IS_FLOAT(x) \

/usr/local/cuda/bin/nvcc -I/home/zhang/.local/lib/python3.7/site-packages/torch/include -I/home/zhang/.local/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/zhang/.local/lib/python3.7/site-packages/torch/include/TH -I/home/zhang/.local/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.7m -c _ext-src/src/ball_query_gpu.cu -o build/temp.linux-x86_64-3.7/_ext-src/src/ball_query_gpu.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -D__CUDA_NO_HALF2_OPERATORS__ --compiler-options '-fPIC' -O2 -I_ext-src/include -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_ext-src -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/home/zhang/.local/lib/python3.7/site-packages/torch/include -I/home/zhang/.local/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/zhang/.local/lib/python3.7/site-packages/torch/include/TH -I/home/zhang/.local/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.7m -c _ext-src/src/bindings.cpp -o build/temp.linux-x86_64-3.7/_ext-src/src/bindings.o -O2 -I_ext-src/include -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_ext-src -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 In file included from /home/zhang/.local/lib/python3.7/site-packages/torch/include/pybind11/pytypes.h:12:0, from /home/zhang/.local/lib/python3.7/site-packages/torch/include/pybind11/cast.h:13, from /home/zhang/.local/lib/python3.7/site-packages/torch/include/pybind11/attr.h:13, from /home/zhang/.local/lib/python3.7/site-packages/torch/include/pybind11/pybind11.h:44, from /home/zhang/.local/lib/python3.7/site-packages/torch/include/torch/csrc/utils/pybind.h:6, from /home/zhang/.local/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/python.h:12, from /home/zhang/.local/lib/python3.7/site-packages/torch/include/torch/extension.h:6, from _ext-src/include/ball_query.h:2, from _ext-src/src/bindings.cpp:1:

:0:26: error: expected initializer before ‘-’ token /home/zhang/.local/lib/python3.7/site-packages/torch/include/pybind11/detail/common.h:213:47: note: in definition of macro ‘PYBIND11_CONCAT’ #define PYBIND11_CONCAT(first, second) first##second ^~~~~~ _ext-src/src/bindings.cpp:6:1: note: in expansion of macro ‘PYBIND11_MODULE’ PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { ^~~~~~~~~~~~~~~ _ext-src/src/bindings.cpp:6:17: note: in expansion of macro ‘TORCH_EXTENSION_NAME’ PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { ^~~~~~~~~~~~~~~~~~~~ :0:26: error: expected initializer before ‘-’ token /home/zhang/.local/lib/python3.7/site-packages/torch/include/pybind11/detail/common.h:172:51: note: in definition of macro ‘PYBIND11_PLUGIN_IMPL’ extern "C" PYBIND11_EXPORT PyObject *PyInit_##name() ^~~~ _ext-src/src/bindings.cpp:6:1: note: in expansion of macro ‘PYBIND11_MODULE’ PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { ^~~~~~~~~~~~~~~ _ext-src/src/bindings.cpp:6:17: note: in expansion of macro ‘TORCH_EXTENSION_NAME’ PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { ^~~~~~~~~~~~~~~~~~~~ :0:26: error: expected initializer before ‘-’ token /home/zhang/.local/lib/python3.7/site-packages/torch/include/pybind11/detail/common.h:213:47: note: in definition of macro ‘PYBIND11_CONCAT’ #define PYBIND11_CONCAT(first, second) first##second ^~~~~~ _ext-src/src/bindings.cpp:6:1: note: in expansion of macro ‘PYBIND11_MODULE’ PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { ^~~~~~~~~~~~~~~ _ext-src/src/bindings.cpp:6:17: note: in expansion of macro ‘TORCH_EXTENSION_NAME’ PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { ^~~~~~~~~~~~~~~~~~~~ error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1 May i have your suggestions to fix this problem? Any help is much appreciated:)
clinplayer commented 2 years ago

Hi, I added requirements.txt. Please try to use pip install -r requirements.txt to setup an environment consistent with mine before installing PointNet++.

AceSilent commented 2 years ago

thank you for your reply! I built PointNet as you configured it, and unfortunately it didn't work out. However, I cloned a code from GIt and used CUDA11.2 and pytorch1.8. After modifying some code, I could run it successfully. (but the previously used code still doesn't work) Very strange phenomenon,I don't use a virtual Python environment. thank you for your reply!:)

kninad commented 2 years ago

@AceSilent Could you share which changes to the code were required? That would help me out as well!

TalBarami commented 2 years ago

thank you for your reply! I built PointNet as you configured it, and unfortunately it didn't work out. However, I cloned a code from GIt and used CUDA11.2 and pytorch1.8. After modifying some code, I could run it successfully. (but the previously used code still doesn't work) Very strange phenomenon,I don't use a virtual Python environment. thank you for your reply!:)

Hey, Could you share the code you changed to make it work?

Thanks!

AceSilent commented 2 years ago

@AceSilent Could you share which changes to the code were required? That would help me out as well!

  1. Change "AT_CHECK" to "TORCH_CHECK" in all CPP.h files.

  2. Change "type().is_cuda()" to "is_cuda()" in all CPP.h files.

  3. Change ".data<float/int>()" to ".data_ptr<float/int>()" in all CPP.h files.

AceSilent commented 2 years ago

thank you for your reply! I built PointNet as you configured it, and unfortunately it didn't work out. However, I cloned a code from GIt and used CUDA11.2 and pytorch1.8. After modifying some code, I could run it successfully. (but the previously used code still doesn't work) Very strange phenomenon,I don't use a virtual Python environment. thank you for your reply!:)

Hey, Could you share the code you changed to make it work?

Thanks!

  1. Change "AT_CHECK" to "TORCH_CHECK" in all CPP.h files.

  2. Change "type().is_cuda()" to "is_cuda()" in all CPP.h files.

  3. Change ".data<float/int>()" to ".data_ptr<float/int>()" in all CPP.h files.

AceSilent commented 2 years ago

I answered this question on GitHub. I hope it helped

------------------ 原始邮件 ------------------ 发件人: "Tal @.>; 发送时间: 2022年9月7日(星期三) 凌晨0:26 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [clinplayer/Point2Skeleton] A new question about installing the Pointnet++ (Issue #14)

thank you for your reply! I built PointNet as you configured it, and unfortunately it didn't work out. However, I cloned a code from GIt and used CUDA11.2 and pytorch1.8. After modifying some code, I could run it successfully. (but the previously used code still doesn't work) Very strange phenomenon,I don't use a virtual Python environment. thank you for your reply!:)

Hey, Could you share the code you changed to make it work?

Thanks!

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>