Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Unable to compile pointnet2 #108

Open
EricWiener opened this issue Dec 14, 2020 · 17 comments
Open

Unable to compile pointnet2 #108

EricWiener opened this issue Dec 14, 2020 · 17 comments

Comments

@EricWiener
Copy link

When running:

I get the error:

(votenet) uma@uma-desktop:~/UMA/3ddl/votenet/pointnet2$ python setup.py install
running install
running bdist_egg
running egg_info
writing pointnet2.egg-info/PKG-INFO
writing dependency_links to pointnet2.egg-info/dependency_links.txt
writing top-level names to pointnet2.egg-info/top_level.txt
reading manifest file 'pointnet2.egg-info/SOURCES.txt'
writing manifest file 'pointnet2.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_ext
building 'pointnet2._ext' extension
Emitting ninja build file /home/uma/UMA/3ddl/votenet/pointnet2/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/9] c++ -MMD -MF /home/uma/UMA/3ddl/votenet/pointnet2/build/temp.linux-x86_64-3.7/_ext_src/src/group_points.o.d -pthread -B /home/uma/miniconda3/envs/votenet/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/TH -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-10.2/include -I/home/uma/miniconda3/envs/votenet/include/python3.7m -c -c /home/uma/UMA/3ddl/votenet/pointnet2/_ext_src/src/group_points.cpp -o /home/uma/UMA/3ddl/votenet/pointnet2/build/temp.linux-x86_64-3.7/_ext_src/src/group_points.o -O2 -I_ext_src/include -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
FAILED: /home/uma/UMA/3ddl/votenet/pointnet2/build/temp.linux-x86_64-3.7/_ext_src/src/group_points.o
c++ -MMD -MF /home/uma/UMA/3ddl/votenet/pointnet2/build/temp.linux-x86_64-3.7/_ext_src/src/group_points.o.d -pthread -B /home/uma/miniconda3/envs/votenet/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/TH -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-10.2/include -I/home/uma/miniconda3/envs/votenet/include/python3.7m -c -c /home/uma/UMA/3ddl/votenet/pointnet2/_ext_src/src/group_points.cpp -o /home/uma/UMA/3ddl/votenet/pointnet2/build/temp.linux-x86_64-3.7/_ext_src/src/group_points.o -O2 -I_ext_src/include -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -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++
/home/uma/UMA/3ddl/votenet/pointnet2/_ext_src/src/group_points.cpp:6:10: fatal error: group_points.h: No such file or directory
 #include "group_points.h"
          ^~~~~~~~~~~~~~~~
compilation terminated.
[2/9] c++ -MMD -MF /home/uma/UMA/3ddl/votenet/pointnet2/build/temp.linux-x86_64-3.7/_ext_src/src/sampling.o.d -pthread -B /home/uma/miniconda3/envs/votenet/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/TH -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-10.2/include -I/home/uma/miniconda3/envs/votenet/include/python3.7m -c -c /home/uma/UMA/3ddl/votenet/pointnet2/_ext_src/src/sampling.cpp -o /home/uma/UMA/3ddl/votenet/pointnet2/build/temp.linux-x86_64-3.7/_ext_src/src/sampling.o -O2 -I_ext_src/include -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
FAILED: /home/uma/UMA/3ddl/votenet/pointnet2/build/temp.linux-x86_64-3.7/_ext_src/src/sampling.o
c++ -MMD -MF /home/uma/UMA/3ddl/votenet/pointnet2/build/temp.linux-x86_64-3.7/_ext_src/src/sampling.o.d -pthread -B /home/uma/miniconda3/envs/votenet/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/TH -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-10.2/include -I/home/uma/miniconda3/envs/votenet/include/python3.7m -c -c /home/uma/UMA/3ddl/votenet/pointnet2/_ext_src/src/sampling.cpp -o /home/uma/UMA/3ddl/votenet/pointnet2/build/temp.linux-x86_64-3.7/_ext_src/src/sampling.o -O2 -I_ext_src/include -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -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++
/home/uma/UMA/3ddl/votenet/pointnet2/_ext_src/src/sampling.cpp:6:10: fatal error: sampling.h: No such file or directory
 #include "sampling.h"
          ^~~~~~~~~~~~
compilation terminated.
[3/9] c++ -MMD -MF /home/uma/UMA/3ddl/votenet/pointnet2/build/temp.linux-x86_64-3.7/_ext_src/src/ball_query.o.d -pthread -B /home/uma/miniconda3/envs/votenet/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/TH -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-10.2/include -I/home/uma/miniconda3/envs/votenet/include/python3.7m -c -c /home/uma/UMA/3ddl/votenet/pointnet2/_ext_src/src/ball_query.cpp -o /home/uma/UMA/3ddl/votenet/pointnet2/build/temp.linux-x86_64-3.7/_ext_src/src/ball_query.o -O2 -I_ext_src/include -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
FAILED: /home/uma/UMA/3ddl/votenet/pointnet2/build/temp.linux-x86_64-3.7/_ext_src/src/ball_query.o
c++ -MMD -MF /home/uma/UMA/3ddl/votenet/pointnet2/build/temp.linux-x86_64-3.7/_ext_src/src/ball_query.o.d -pthread -B /home/uma/miniconda3/envs/votenet/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/TH -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-10.2/include -I/home/uma/miniconda3/envs/votenet/include/python3.7m -c -c /home/uma/UMA/3ddl/votenet/pointnet2/_ext_src/src/ball_query.cpp -o /home/uma/UMA/3ddl/votenet/pointnet2/build/temp.linux-x86_64-3.7/_ext_src/src/ball_query.o -O2 -I_ext_src/include -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -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++
/home/uma/UMA/3ddl/votenet/pointnet2/_ext_src/src/ball_query.cpp:6:10: fatal error: ball_query.h: No such file or directory
 #include "ball_query.h"
          ^~~~~~~~~~~~~~
compilation terminated.
[4/9] c++ -MMD -MF /home/uma/UMA/3ddl/votenet/pointnet2/build/temp.linux-x86_64-3.7/_ext_src/src/interpolate.o.d -pthread -B /home/uma/miniconda3/envs/votenet/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/TH -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-10.2/include -I/home/uma/miniconda3/envs/votenet/include/python3.7m -c -c /home/uma/UMA/3ddl/votenet/pointnet2/_ext_src/src/interpolate.cpp -o /home/uma/UMA/3ddl/votenet/pointnet2/build/temp.linux-x86_64-3.7/_ext_src/src/interpolate.o -O2 -I_ext_src/include -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
FAILED: /home/uma/UMA/3ddl/votenet/pointnet2/build/temp.linux-x86_64-3.7/_ext_src/src/interpolate.o
c++ -MMD -MF /home/uma/UMA/3ddl/votenet/pointnet2/build/temp.linux-x86_64-3.7/_ext_src/src/interpolate.o.d -pthread -B /home/uma/miniconda3/envs/votenet/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/TH -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-10.2/include -I/home/uma/miniconda3/envs/votenet/include/python3.7m -c -c /home/uma/UMA/3ddl/votenet/pointnet2/_ext_src/src/interpolate.cpp -o /home/uma/UMA/3ddl/votenet/pointnet2/build/temp.linux-x86_64-3.7/_ext_src/src/interpolate.o -O2 -I_ext_src/include -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -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++
/home/uma/UMA/3ddl/votenet/pointnet2/_ext_src/src/interpolate.cpp:6:10: fatal error: interpolate.h: No such file or directory
 #include "interpolate.h"
          ^~~~~~~~~~~~~~~
compilation terminated.
[5/9] c++ -MMD -MF /home/uma/UMA/3ddl/votenet/pointnet2/build/temp.linux-x86_64-3.7/_ext_src/src/bindings.o.d -pthread -B /home/uma/miniconda3/envs/votenet/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/TH -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-10.2/include -I/home/uma/miniconda3/envs/votenet/include/python3.7m -c -c /home/uma/UMA/3ddl/votenet/pointnet2/_ext_src/src/bindings.cpp -o /home/uma/UMA/3ddl/votenet/pointnet2/build/temp.linux-x86_64-3.7/_ext_src/src/bindings.o -O2 -I_ext_src/include -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
FAILED: /home/uma/UMA/3ddl/votenet/pointnet2/build/temp.linux-x86_64-3.7/_ext_src/src/bindings.o
c++ -MMD -MF /home/uma/UMA/3ddl/votenet/pointnet2/build/temp.linux-x86_64-3.7/_ext_src/src/bindings.o.d -pthread -B /home/uma/miniconda3/envs/votenet/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/TH -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-10.2/include -I/home/uma/miniconda3/envs/votenet/include/python3.7m -c -c /home/uma/UMA/3ddl/votenet/pointnet2/_ext_src/src/bindings.cpp -o /home/uma/UMA/3ddl/votenet/pointnet2/build/temp.linux-x86_64-3.7/_ext_src/src/bindings.o -O2 -I_ext_src/include -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -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++
/home/uma/UMA/3ddl/votenet/pointnet2/_ext_src/src/bindings.cpp:6:10: fatal error: ball_query.h: No such file or directory
 #include "ball_query.h"
          ^~~~~~~~~~~~~~
compilation terminated.
[6/9] /usr/local/cuda-10.2/bin/nvcc -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/TH -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-10.2/include -I/home/uma/miniconda3/envs/votenet/include/python3.7m -c -c /home/uma/UMA/3ddl/votenet/pointnet2/_ext_src/src/interpolate_gpu.cu -o /home/uma/UMA/3ddl/votenet/pointnet2/build/temp.linux-x86_64-3.7/_ext_src/src/interpolate_gpu.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O2 -I_ext_src/include -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=sm_75 -std=c++14
FAILED: /home/uma/UMA/3ddl/votenet/pointnet2/build/temp.linux-x86_64-3.7/_ext_src/src/interpolate_gpu.o
/usr/local/cuda-10.2/bin/nvcc -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/TH -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-10.2/include -I/home/uma/miniconda3/envs/votenet/include/python3.7m -c -c /home/uma/UMA/3ddl/votenet/pointnet2/_ext_src/src/interpolate_gpu.cu -o /home/uma/UMA/3ddl/votenet/pointnet2/build/temp.linux-x86_64-3.7/_ext_src/src/interpolate_gpu.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O2 -I_ext_src/include -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=sm_75 -std=c++14
/home/uma/UMA/3ddl/votenet/pointnet2/_ext_src/src/interpolate_gpu.cu:10:10: fatal error: cuda_utils.h: No such file or directory
 #include "cuda_utils.h"
          ^~~~~~~~~~~~~~
compilation terminated.
[7/9] /usr/local/cuda-10.2/bin/nvcc -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/TH -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-10.2/include -I/home/uma/miniconda3/envs/votenet/include/python3.7m -c -c /home/uma/UMA/3ddl/votenet/pointnet2/_ext_src/src/group_points_gpu.cu -o /home/uma/UMA/3ddl/votenet/pointnet2/build/temp.linux-x86_64-3.7/_ext_src/src/group_points_gpu.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O2 -I_ext_src/include -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=sm_75 -std=c++14
FAILED: /home/uma/UMA/3ddl/votenet/pointnet2/build/temp.linux-x86_64-3.7/_ext_src/src/group_points_gpu.o
/usr/local/cuda-10.2/bin/nvcc -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/TH -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-10.2/include -I/home/uma/miniconda3/envs/votenet/include/python3.7m -c -c /home/uma/UMA/3ddl/votenet/pointnet2/_ext_src/src/group_points_gpu.cu -o /home/uma/UMA/3ddl/votenet/pointnet2/build/temp.linux-x86_64-3.7/_ext_src/src/group_points_gpu.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O2 -I_ext_src/include -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=sm_75 -std=c++14
/home/uma/UMA/3ddl/votenet/pointnet2/_ext_src/src/group_points_gpu.cu:9:10: fatal error: cuda_utils.h: No such file or directory
 #include "cuda_utils.h"
          ^~~~~~~~~~~~~~
compilation terminated.
[8/9] /usr/local/cuda-10.2/bin/nvcc -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/TH -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-10.2/include -I/home/uma/miniconda3/envs/votenet/include/python3.7m -c -c /home/uma/UMA/3ddl/votenet/pointnet2/_ext_src/src/ball_query_gpu.cu -o /home/uma/UMA/3ddl/votenet/pointnet2/build/temp.linux-x86_64-3.7/_ext_src/src/ball_query_gpu.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O2 -I_ext_src/include -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=sm_75 -std=c++14
FAILED: /home/uma/UMA/3ddl/votenet/pointnet2/build/temp.linux-x86_64-3.7/_ext_src/src/ball_query_gpu.o
/usr/local/cuda-10.2/bin/nvcc -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/TH -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-10.2/include -I/home/uma/miniconda3/envs/votenet/include/python3.7m -c -c /home/uma/UMA/3ddl/votenet/pointnet2/_ext_src/src/ball_query_gpu.cu -o /home/uma/UMA/3ddl/votenet/pointnet2/build/temp.linux-x86_64-3.7/_ext_src/src/ball_query_gpu.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O2 -I_ext_src/include -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=sm_75 -std=c++14
/home/uma/UMA/3ddl/votenet/pointnet2/_ext_src/src/ball_query_gpu.cu:10:10: fatal error: cuda_utils.h: No such file or directory
 #include "cuda_utils.h"
          ^~~~~~~~~~~~~~
compilation terminated.
[9/9] /usr/local/cuda-10.2/bin/nvcc -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/TH -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-10.2/include -I/home/uma/miniconda3/envs/votenet/include/python3.7m -c -c /home/uma/UMA/3ddl/votenet/pointnet2/_ext_src/src/sampling_gpu.cu -o /home/uma/UMA/3ddl/votenet/pointnet2/build/temp.linux-x86_64-3.7/_ext_src/src/sampling_gpu.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O2 -I_ext_src/include -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=sm_75 -std=c++14
FAILED: /home/uma/UMA/3ddl/votenet/pointnet2/build/temp.linux-x86_64-3.7/_ext_src/src/sampling_gpu.o
/usr/local/cuda-10.2/bin/nvcc -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/TH -I/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-10.2/include -I/home/uma/miniconda3/envs/votenet/include/python3.7m -c -c /home/uma/UMA/3ddl/votenet/pointnet2/_ext_src/src/sampling_gpu.cu -o /home/uma/UMA/3ddl/votenet/pointnet2/build/temp.linux-x86_64-3.7/_ext_src/src/sampling_gpu.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O2 -I_ext_src/include -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=sm_75 -std=c++14
/home/uma/UMA/3ddl/votenet/pointnet2/_ext_src/src/sampling_gpu.cu:9:10: fatal error: cuda_utils.h: No such file or directory
 #include "cuda_utils.h"
          ^~~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1539, in _run_ninja_build
    env=env)
  File "/home/uma/miniconda3/envs/votenet/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 29, in <module>
    'build_ext': BuildExtension
  File "/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/home/uma/miniconda3/envs/votenet/lib/python3.7/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/home/uma/miniconda3/envs/votenet/lib/python3.7/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/home/uma/miniconda3/envs/votenet/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/setuptools/command/install.py", line 67, in run
    self.do_egg_install()
  File "/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/setuptools/command/install.py", line 109, in do_egg_install
    self.run_command('bdist_egg')
  File "/home/uma/miniconda3/envs/votenet/lib/python3.7/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/home/uma/miniconda3/envs/votenet/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 167, in run
    cmd = self.call_command('install_lib', warn_dir=0)
  File "/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 153, in call_command
    self.run_command(cmdname)
  File "/home/uma/miniconda3/envs/votenet/lib/python3.7/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/home/uma/miniconda3/envs/votenet/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/setuptools/command/install_lib.py", line 11, in run
    self.build()
  File "/home/uma/miniconda3/envs/votenet/lib/python3.7/distutils/command/install_lib.py", line 107, in build
    self.run_command('build_ext')
  File "/home/uma/miniconda3/envs/votenet/lib/python3.7/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/home/uma/miniconda3/envs/votenet/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 79, in run
    _build_ext.run(self)
  File "/home/uma/miniconda3/envs/votenet/lib/python3.7/distutils/command/build_ext.py", line 340, in run
    self.build_extensions()
  File "/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 670, in build_extensions
    build_ext.build_extensions(self)
  File "/home/uma/miniconda3/envs/votenet/lib/python3.7/distutils/command/build_ext.py", line 449, in build_extensions
    self._build_extensions_serial()
  File "/home/uma/miniconda3/envs/votenet/lib/python3.7/distutils/command/build_ext.py", line 474, in _build_extensions_serial
    self.build_extension(ext)
  File "/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 196, in build_extension
    _build_ext.build_extension(self, ext)
  File "/home/uma/miniconda3/envs/votenet/lib/python3.7/distutils/command/build_ext.py", line 534, in build_extension
    depends=ext.depends)
  File "/home/uma/miniconda3/envs/votenet/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 500, in unix_wrap_ninja_compile
    with_cuda=with_cuda)
  File "/home/uma/miniconda3/envs/votenet/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/uma/miniconda3/envs/votenet/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

Here's my conda list:

# packages in environment at /home/uma/miniconda3/envs/votenet:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main
_pytorch_select           0.1                       cpu_0
_tflow_select             2.3.0                       mkl
absl-py                   0.11.0             pyhd3eb1b0_1
astunparse                1.6.3                      py_0
blas                      1.0                         mkl
blinker                   1.4                      py37_0
brotlipy                  0.7.0           py37h27cfd23_1003
c-ares                    1.17.1               h27cfd23_0
ca-certificates           2020.12.8            h06a4308_0
cachetools                4.2.0              pyhd3eb1b0_0
certifi                   2020.12.5        py37h06a4308_0
cffi                      1.14.4           py37h261ae71_0
chardet                   3.0.4           py37h06a4308_1003
click                     7.1.2                      py_0
cryptography              3.3.1            py37h3c74f83_0
cudatoolkit               10.2.89              hfd86e86_1
freetype                  2.10.4               h5ab3b9f_0
gast                      0.3.3                      py_0
google-auth               1.21.3                     py_0
google-auth-oauthlib      0.4.2              pyhd3eb1b0_2
google-pasta              0.2.0                      py_0
grpcio                    1.31.0           py37hf8bcb03_0
h5py                      2.10.0           py37hd6299e0_1
hdf5                      1.10.6               hb1b8bf9_0
idna                      2.10                       py_0
importlib-metadata        2.0.0                      py_1
intel-openmp              2019.4                      243
jpeg                      9b                   h024ee3a_2
keras-preprocessing       1.1.0                      py_1
lcms2                     2.11                 h396b838_0
ld_impl_linux-64          2.33.1               h53a641e_7
libedit                   3.1.20191231         h14c3975_1
libffi                    3.3                  he6710b0_2
libgcc-ng                 9.1.0                hdf63c60_0
libgfortran-ng            7.3.0                hdf63c60_0
libpng                    1.6.37               hbc83047_0
libprotobuf               3.13.0.1             hd408876_0
libstdcxx-ng              9.1.0                hdf63c60_0
libtiff                   4.1.0                h2733197_1
libuv                     1.40.0               h7b6447c_0
lz4-c                     1.9.2                heb0550a_3
markdown                  3.3.3            py37h06a4308_0
mkl                       2019.4                      243
mkl-service               2.3.0            py37he8ac12f_0
mkl_fft                   1.2.0            py37h23d657b_0
mkl_random                1.1.0            py37hd6b4f25_0
ncurses                   6.2                  he6710b0_1
ninja                     1.10.2           py37hff7bd54_0
numpy                     1.19.2           py37h54aff64_0
numpy-base                1.19.2           py37hfa32c7d_0
oauthlib                  3.1.0                      py_0
olefile                   0.46                     py37_0
openssl                   1.1.1i               h27cfd23_0
opt_einsum                3.1.0                      py_0
pillow                    8.0.1            py37he98fc37_0
pip                       20.3.1           py37h06a4308_0
protobuf                  3.13.0.1         py37he6710b0_1
pyasn1                    0.4.8                      py_0
pyasn1-modules            0.2.8                      py_0
pycparser                 2.20                       py_2
pyjwt                     1.7.1                    py37_0
pyopenssl                 20.0.0             pyhd3eb1b0_1
pysocks                   1.7.1                    py37_1
python                    3.7.9                h7579374_0
pytorch                   1.7.1           py3.7_cuda10.2.89_cudnn7.6.5_0    pytorch
readline                  8.0                  h7b6447c_0
requests                  2.25.0             pyhd3eb1b0_0
requests-oauthlib         1.3.0                      py_0
rsa                       4.6                        py_0
scipy                     1.5.2            py37h0b6359f_0
setuptools                51.0.0           py37h06a4308_2
six                       1.15.0           py37h06a4308_0
sqlite                    3.33.0               h62c20be_0
tensorboard               2.3.0              pyh4dce500_0
tensorboard-plugin-wit    1.6.0                      py_0
tensorflow                2.3.0           mkl_py37h0481017_0
tensorflow-base           2.3.0           mkl_py37he9661a2_0
tensorflow-estimator      2.3.0              pyheb71bc4_0
termcolor                 1.1.0                    py37_1
tk                        8.6.10               hbc83047_0
torchvision               0.8.2                py37_cu102    pytorch
typing_extensions         3.7.4.3                    py_0
urllib3                   1.25.11                    py_0
werkzeug                  1.0.1                      py_0
wheel                     0.36.1             pyhd3eb1b0_0
wrapt                     1.12.1           py37h7b6447c_1
xz                        5.2.5                h7b6447c_0
zipp                      3.4.0              pyhd3eb1b0_0
zlib                      1.2.11               h7b6447c_3
zstd                      1.4.5                h9ceee32_0

If you have any advice, I'd really appreciate it. Please let me know if you need more information.

@MBaranPeker
Copy link

@EricWiener What is your gpu model? It is common to have promlem because RTX 30 series gpus works with cuda 11 or higher. Most of the people does not aware of that

@EricWiener
Copy link
Author

@MBaranPeker I have a Nvidia RTX 2070 8 GB

@adamchang2000
Copy link

Anybody have a fix for this? Also running CUDA 11.1, Python3.7, RTX 3090, Pytorch 1.7.0.

@adamchang2000
Copy link

Found a fix:

  1. change all instances of AT_CHECK to TORCH_CHECK inside all the source files inside pointnet2/_ext_src/src and pointnet2/_ext_src/include. This is due to an API change in PyTorch.
  2. change pointnet2/setup.py:
# Copyright (c) Facebook, Inc. and its affiliates.
# 
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

from setuptools import setup
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
import glob
import os

_ext_src_root = "_ext_src"
_ext_sources = glob.glob("{}/src/*.cpp".format(_ext_src_root)) + glob.glob(
    "{}/src/*.cu".format(_ext_src_root)
)
_ext_headers = glob.glob("{}/include/*".format(_ext_src_root))

headers = "-I" + os.path.join(os.path.dirname(os.path.abspath(__file__)), '_ext_src', 'include')

setup(
    name='pointnet2',
    ext_modules=[
        CUDAExtension(
            name='pointnet2._ext',
            sources=_ext_sources,
            extra_compile_args={
                "cxx": ["-O2", headers],
                "nvcc": ["-O2", headers]
            },
        )
    ],
    cmdclass={
        'build_ext': BuildExtension
    }
)

The issue here is that the extra_compile_args doesn't accept relative paths correctly (probably because the working directory changes). We need to make sure headers is an absolute path.

@daxiongpro
Copy link

Found a fix:

  1. change all instances of AT_CHECK to TORCH_CHECK inside all the source files inside pointnet2/_ext_src/src and pointnet2/_ext_src/include. This is due to an API change in PyTorch.
  2. change pointnet2/setup.py:
# Copyright (c) Facebook, Inc. and its affiliates.
# 
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

from setuptools import setup
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
import glob
import os

_ext_src_root = "_ext_src"
_ext_sources = glob.glob("{}/src/*.cpp".format(_ext_src_root)) + glob.glob(
    "{}/src/*.cu".format(_ext_src_root)
)
_ext_headers = glob.glob("{}/include/*".format(_ext_src_root))

headers = "-I" + os.path.join(os.path.dirname(os.path.abspath(__file__)), '_ext_src', 'include')

setup(
    name='pointnet2',
    ext_modules=[
        CUDAExtension(
            name='pointnet2._ext',
            sources=_ext_sources,
            extra_compile_args={
                "cxx": ["-O2", headers],
                "nvcc": ["-O2", headers]
            },
        )
    ],
    cmdclass={
        'build_ext': BuildExtension
    }
)

The issue here is that the extra_compile_args doesn't accept relative paths correctly (probably because the working directory changes). We need to make sure headers is an absolute path.

I want to ask how to change all instances of AT_CHECK to TORCH_CHECK inside all the source files inside pointnet2/_ext_src/src and pointnet2/_ext_src/include. This is due to an API change in PyTorch?

@daxiongpro
Copy link

@EricWiener What is your gpu model? It is common to have promlem because RTX 30 series gpus works with cuda 11 or higher. Most of the people does not aware of that

yes my gpu is RTX 3080, do you know how to run the code in 3080gpu?

@daxiongpro
Copy link

Found a fix:

  1. change all instances of AT_CHECK to TORCH_CHECK inside all the source files inside pointnet2/_ext_src/src and pointnet2/_ext_src/include. This is due to an API change in PyTorch.
  2. change pointnet2/setup.py:
# Copyright (c) Facebook, Inc. and its affiliates.
# 
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

from setuptools import setup
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
import glob
import os

_ext_src_root = "_ext_src"
_ext_sources = glob.glob("{}/src/*.cpp".format(_ext_src_root)) + glob.glob(
    "{}/src/*.cu".format(_ext_src_root)
)
_ext_headers = glob.glob("{}/include/*".format(_ext_src_root))

headers = "-I" + os.path.join(os.path.dirname(os.path.abspath(__file__)), '_ext_src', 'include')

setup(
    name='pointnet2',
    ext_modules=[
        CUDAExtension(
            name='pointnet2._ext',
            sources=_ext_sources,
            extra_compile_args={
                "cxx": ["-O2", headers],
                "nvcc": ["-O2", headers]
            },
        )
    ],
    cmdclass={
        'build_ext': BuildExtension
    }
)

The issue here is that the extra_compile_args doesn't accept relative paths correctly (probably because the working directory changes). We need to make sure headers is an absolute path.

SO Great! thank you!and I success run my code(Imvotenet).

@tangyipeng100
Copy link

Great! I have solved this problem, my GPU is RTX3080, Pytorch 1.7.1

@a462428
Copy link

a462428 commented Aug 27, 2021

CUDAExtension(
name='pointnet2._ext'

Should be changed to

CUDAExtension(
name='pointnet2._ext_src'

@zhqia
Copy link

zhqia commented Dec 22, 2021

I have change all instances of AT_CHECK to TORCH_CHECK, and rewrite setup.py but still got error like this:
ext_src/src/group_points.cpp : 28 : 3 : error: expected 'while' before 'at'
28| at::Tensor output=
| ^~
ext_src/src/group_points.cpp : 28 : 3 : error: expected '(' before 'at'
28| at::Tensor output=
| ^~
| (
ext_src/src/group_points.cpp : 28 : 14 : error: expected primary-expression before 'output'
28| at::Tensor output=
| ^~~~~
ext_src/src/group_points.cpp : 28 : 13 : error: expected ')' before 'output'
28| at::Tensor output=
| ~~ ^~~~~
| )
ext_src/src/group_points.cpp : 28 : 13 : error: expected ':' before 'output'
28| at::Tensor output=
| ^~~~~
| :
ext_src/src/group_points.cpp : 28 : 14 : error: 'output' was not declared in this scope; did you mean 'c10::attr::output'?
28| at::Tensor output=
| ^~~~~
| c10::attr::output

@goodpp
Copy link

goodpp commented Dec 23, 2021

Thanks

@realAsma
Copy link

Found a fix:

  1. change all instances of AT_CHECK to TORCH_CHECK inside all the source files inside pointnet2/_ext_src/src and pointnet2/_ext_src/include. This is due to an API change in PyTorch.
  2. change pointnet2/setup.py:
# Copyright (c) Facebook, Inc. and its affiliates.
# 
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

from setuptools import setup
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
import glob
import os

_ext_src_root = "_ext_src"
_ext_sources = glob.glob("{}/src/*.cpp".format(_ext_src_root)) + glob.glob(
    "{}/src/*.cu".format(_ext_src_root)
)
_ext_headers = glob.glob("{}/include/*".format(_ext_src_root))

headers = "-I" + os.path.join(os.path.dirname(os.path.abspath(__file__)), '_ext_src', 'include')

setup(
    name='pointnet2',
    ext_modules=[
        CUDAExtension(
            name='pointnet2._ext',
            sources=_ext_sources,
            extra_compile_args={
                "cxx": ["-O2", headers],
                "nvcc": ["-O2", headers]
            },
        )
    ],
    cmdclass={
        'build_ext': BuildExtension
    }
)

The issue here is that the extra_compile_args doesn't accept relative paths correctly (probably because the working directory changes). We need to make sure headers is an absolute path.

Awesome! worked nicely, Kudos to you!!

@faaaceless
Copy link

That fix works for torch 1.10, thanks a lot!!!

@reynoldscem
Copy link

I want to ask how to change all instances of AT_CHECK to TORCH_CHECK inside all the source files inside pointnet2/_ext_src/src and pointnet2/_ext_src/include. This is due to an API change in PyTorch?

@daxiongpro All the mentions in the extension source not the source of pytorch as a whole. Run this in your pointnet2 directiory.

grep -rl AT_CHECK | xargs sed -i 's/AT_CHECK/TORCH_CHECK/g'

@Qi-Zhangyang
Copy link

Found a fix:

  1. change all instances of AT_CHECK to TORCH_CHECK inside all the source files inside pointnet2/_ext_src/src and pointnet2/_ext_src/include. This is due to an API change in PyTorch.
  2. change pointnet2/setup.py:
# Copyright (c) Facebook, Inc. and its affiliates.
# 
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

from setuptools import setup
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
import glob
import os

_ext_src_root = "_ext_src"
_ext_sources = glob.glob("{}/src/*.cpp".format(_ext_src_root)) + glob.glob(
    "{}/src/*.cu".format(_ext_src_root)
)
_ext_headers = glob.glob("{}/include/*".format(_ext_src_root))

headers = "-I" + os.path.join(os.path.dirname(os.path.abspath(__file__)), '_ext_src', 'include')

setup(
    name='pointnet2',
    ext_modules=[
        CUDAExtension(
            name='pointnet2._ext',
            sources=_ext_sources,
            extra_compile_args={
                "cxx": ["-O2", headers],
                "nvcc": ["-O2", headers]
            },
        )
    ],
    cmdclass={
        'build_ext': BuildExtension
    }
)

The issue here is that the extra_compile_args doesn't accept relative paths correctly (probably because the working directory changes). We need to make sure headers is an absolute path.

That works for me. Maybe it because that cuda version question, New cuda version uses the TORCH_CHECK instead of the AT_CHECK.

@yangjunxiu
Copy link

I want to ask how to change all instances of AT_CHECK to TORCH_CHECK inside all the source files inside pointnet2/_ext_src/src and pointnet2/_ext_src/include. This is due to an API change in PyTorch?

@daxiongpro All the mentions in the extension source not the source of pytorch as a whole. Run this in your pointnet2 directiory.

grep -rl AT_CHECK | xargs sed -i 's/AT_CHECK/TORCH_CHECK/g'

operation system is win or Linux?

@yangjunxiu
Copy link

I want to ask how to change all instances of AT_CHECK to TORCH_CHECK inside all the source files inside pointnet2/_ext_src/src and pointnet2/_ext_src/include. This is due to an API change in PyTorch?

@daxiongpro All the mentions in the extension source not the source of pytorch as a whole. Run this in your pointnet2 directiory.

grep -rl AT_CHECK | xargs sed -i 's/AT_CHECK/TORCH_CHECK/g'

Thank U!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests