yifliu3 / EPT-Net

Edge-oriented Point cloud Transformer for 3D Intracranial Aneurysm Segmentation. MICCAI22
MIT License
13 stars 7 forks source link

compile cuda operations error #5

Closed xingers closed 1 year ago

xingers commented 2 years ago

When I use the following: -IW4222:~/EPT/point_transformer_lib$ python3 setup.py build_exit install in the ept environment which was absolutely installed by readme.txt

I got this: error: invalid command 'build_exit'

If I change the command to 'python3 setup.py build_ext install', which is included in setup.py, I got: [9/9] c++ -MMD -MF /home/zxli/EPT/point_transformer_lib/build/temp.linux-x86_64-cpython-37/point_transformer_ops/_ext-src/src/bindings.o.d -pthread -B /home/zxli/anaconda3/envs/ept/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/zxli/EPT/point_transformer_lib/point_transformer_ops/_ext-src/include -I/home/zxli/anaconda3/envs/ept/lib/python3.7/site-packages/torch/include -I/home/zxli/anaconda3/envs/ept/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/zxli/anaconda3/envs/ept/lib/python3.7/site-packages/torch/include/TH -I/home/zxli/anaconda3/envs/ept/lib/python3.7/site-packages/torch/include/THC -I:/usr/local/cuda-10.1:/usr/local/cuda-11.7/include -I/home/zxli/anaconda3/envs/ept/include/python3.7m -c -c /home/zxli/EPT/point_transformer_lib/point_transformer_ops/_ext-src/src/bindings.cpp -o /home/zxli/EPT/point_transformer_lib/build/temp.linux-x86_64-cpython-37/point_transformer_ops/_ext-src/src/bindings.o -O3 -DTORCH_API_INCLUDE_EXTENSION_H -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++ In file included from /home/zxli/anaconda3/envs/ept/lib/python3.7/site-packages/torch/include/ATen/Parallel.h:149:0, from /home/zxli/anaconda3/envs/ept/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/utils.h:3, from /home/zxli/anaconda3/envs/ept/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:5, from /home/zxli/anaconda3/envs/ept/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/nn.h:3, from /home/zxli/anaconda3/envs/ept/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:12, from /home/zxli/anaconda3/envs/ept/lib/python3.7/site-packages/torch/include/torch/extension.h:4, from /home/zxli/EPT/point_transformer_lib/point_transformer_ops/_ext-src/include/ball_query.h:2, from /home/zxli/EPT/point_transformer_lib/point_transformer_ops/_ext-src/src/bindings.cpp:1: /home/zxli/anaconda3/envs/ept/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) ninja: build stopped: subcommand failed. Traceback (most recent call last): File "/home/zxli/anaconda3/envs/ept/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1522, in _run_ninja_build env=env) File "/home/zxli/anaconda3/envs/ept/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 38, in <module> include_package_data=True, File "/home/zxli/anaconda3/envs/ept/lib/python3.7/site-packages/setuptools/__init__.py", line 87, in setup return distutils.core.setup(**attrs) File "/home/zxli/anaconda3/envs/ept/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 185, in setup return run_commands(dist) File "/home/zxli/anaconda3/envs/ept/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 201, in run_commands dist.run_commands() File "/home/zxli/anaconda3/envs/ept/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 973, in run_commands self.run_command(cmd) File "/home/zxli/anaconda3/envs/ept/lib/python3.7/site-packages/setuptools/dist.py", line 1217, in run_command super().run_command(command) File "/home/zxli/anaconda3/envs/ept/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 992, in run_command cmd_obj.run() File "/home/zxli/anaconda3/envs/ept/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 79, in run _build_ext.run(self) File "/home/zxli/anaconda3/envs/ept/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 346, in run self.build_extensions() File "/home/zxli/anaconda3/envs/ept/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 653, in build_extensions build_ext.build_extensions(self) File "/home/zxli/anaconda3/envs/ept/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 466, in build_extensions self._build_extensions_serial() File "/home/zxli/anaconda3/envs/ept/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 492, in _build_extensions_serial self.build_extension(ext) File "/home/zxli/anaconda3/envs/ept/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 202, in build_extension _build_ext.build_extension(self, ext) File "/home/zxli/anaconda3/envs/ept/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 554, in build_extension depends=ext.depends, File "/home/zxli/anaconda3/envs/ept/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 482, in unix_wrap_ninja_compile with_cuda=with_cuda) File "/home/zxli/anaconda3/envs/ept/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/zxli/anaconda3/envs/ept/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

Could you tell me where I have mistakes?