Closed zxhcho closed 1 year ago
First of all, the cpp module may not work properly if you use a different version of kuda or torch. Please restore to the original version. Also, these cases maybe related to nvcc(the error says there are some problems in compiling cuda files, and nvcc is cuda compiler). can you check nvcc version? Thank you.
On Fri, Jun 30, 2023 at 6:24 PM Shelf_Zhang @.***> wrote:
Hello, my configuration is Ubuntu 22.04LTS GPU: 1080Ti, 4090 both tried gcc: 10,11,12 all tried libtorch(1.8.1),
following your install option, I first use torch(1.7.1) and cuda(11.0), and run cd external_libs/pointops && python setup.py install to install pointops. But I comes to this error:
Traceback (most recent call last): File "setup.py", line 12, in
setup( File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/init.py", line 107, in setup return distutils.core.setup(**attrs) File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 185, in setup return run_commands(dist) File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 201, in run_commands dist.run_commands() File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands self.run_command(cmd) File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/dist.py", line 1244, in run_command super().run_command(command) File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/command/install.py", line 80, in run self.do_egg_install() File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/command/install.py", line 129, in do_egg_install self.run_command('bdist_egg') File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command self.distribution.run_command(command) File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/dist.py", line 1244, in run_command super().run_command(command) File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/command/bdist_egg.py", line 164, in run cmd = self.call_command('install_lib', warn_dir=0) File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/command/bdist_egg.py", line 150, in call_command self.run_command(cmdname) File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command self.distribution.run_command(command) File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/dist.py", line 1244, in run_command super().run_command(command) File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/command/install_lib.py", line 11, in run self.build() File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/_distutils/command/install_lib.py", line 111, in build self.run_command('build_ext') File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command self.distribution.run_command(command) File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/dist.py", line 1244, in run_command super().run_command(command) File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 84, in run _build_ext.run(self) File "/home/zxh/.local/lib/python3.8/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run _build_ext.build_ext.run(self) File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run self.build_extensions() File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 670, in build_extensions build_ext.build_extensions(self) File "/home/zxh/.local/lib/python3.8/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions _build_ext.build_ext.build_extensions(self) File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions self._build_extensions_serial() File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial self.build_extension(ext) File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 246, in build_extension _build_ext.build_extension(self, ext) File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 548, in build_extension objects = self.compiler.compile( File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 491, in unix_wrap_ninja_compile _write_ninja_file_and_compile_objects( File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1250, in _write_ninja_file_and_compile_objects _run_ninja_build( File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1555, in _run_ninja_build raise RuntimeError(message) from e RuntimeError: Error compiling objects for extension Then I solve this issue by change version in a new env conda install pytorch==1.2.0 torchvision==0.4.0 cudatoolkit=10.0 -c pytorch, but another issue arise:
src/aggregation/aggregation_cuda.cpp: In function ‘void aggregation_forward_cuda(int, int, int, int, at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor)’: src/aggregation/aggregation_cuda.cpp:10:48: error: expected primary-expression before ‘float’ 10 | const float input = input_tensor.data_ptr
(); | ^~~~~ src/aggregation/aggregation_cuda.cpp:11:54: error: expected primary-expression before ‘float’ 11 | const float position = position_tensor.data_ptr(); | ^~~~~ src/aggregation/aggregation_cuda.cpp:12:50: error: expected primary-expression before ‘float’ 12 | const float weight = weight_tensor.data_ptr (); | ^~~~~ src/aggregation/aggregation_cuda.cpp:13:42: error: expected primary-expression before ‘int’ 13 | const int idx = idx_tensor.data_ptr(); | ^~~ src/aggregation/aggregation_cuda.cpp:14:44: error: expected primary-expression before ‘float’ 14 | float *output = output_tensor.data_ptr (); I have no good ideal about it, can you give me some prompts?
— Reply to this email directly, view it on GitHub https://github.com/limhoyeon/ToothGroupNetwork/issues/6, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQW6T2Q6H5G4FLZ44RJOMGLXN2LL7ANCNFSM6AAAAAAZZS6TZU . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Thanks for your fast reply, current nvcc
version:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Thu_Nov_18_09:45:30_PST_2021
Cuda compilation tools, release 11.5, V11.5.119
Build cuda_11.5.r11.5/compiler.30672275_0
If I restore to torch
(1.7.1) and cuda
(11.0), how should I resolve the first RuntimeError, I've searched similiar topics, and they recommend to downgrade version https://github.com/CharlesShang/DCNv2/issues/86
I'll appreciate it if you can export a config file environment.yml
to exactly rebuild your environment.
name: dp
channels:
- pytorch
- defaults
dependencies:
- blas=1.0=mkl
- ca-certificates=2022.07.19=haa95532_0
- certifi=2022.9.24=py37haa95532_0
- cudatoolkit=10.2.89=h74a9793_1
- freetype=2.12.1=ha860e81_0
- intel-openmp=2021.4.0=haa95532_3556
- jpeg=9b=hb83a4c4_2
- lerc=3.0=hd77b12b_0
- libdeflate=1.8=h2bbff1b_5
- libpng=1.6.37=h2a8f88b_0
- libtiff=4.4.0=h8a3f274_0
- libuv=1.40.0=he774522_0
- libwebp=1.2.4=h2bbff1b_0
- libwebp-base=1.2.4=h2bbff1b_0
- lz4-c=1.9.3=h2bbff1b_1
- mkl=2021.4.0=haa95532_640
- mkl-service=2.4.0=py37h2bbff1b_0
- mkl_fft=1.3.1=py37h277e83a_0
- mkl_random=1.2.2=py37hf11a4ad_0
- ninja=1.10.2=haa95532_5
- ninja-base=1.10.2=h6d14046_5
- numpy=1.21.5=py37h7a0a035_3
- numpy-base=1.21.5=py37hca35cd5_3
- openssl=1.1.1q=h2bbff1b_0
- pip=22.2.2=py37haa95532_0
- python=3.7.13=h6244533_1
- pytorch=1.8.1=py3.7_cuda10.2_cudnn7_0
- six=1.16.0=pyhd3eb1b0_1
- sqlite=3.39.3=h2bbff1b_0
- tk=8.6.12=h2bbff1b_0
- torchaudio=0.8.1=py37
- torchvision=0.9.1=py37_cu102
- typing_extensions=4.3.0=py37haa95532_0
- vc=14.2=h21ff451_1
- vs2015_runtime=14.27.29016=h5e58377_2
- wheel=0.37.1=pyhd3eb1b0_0
- wincertstore=0.2=py37haa95532_2
- xz=5.2.6=h8cc25b3_0
- zlib=1.2.13=h8cc25b3_0
- zstd=1.5.2=h19a0ad4_0
- pip:
- absl-py==1.3.0
- aiohttp==3.8.3
- aiosignal==1.2.0
- altgraph==0.17.3
- antlr4-python3-runtime==4.9.3
- astunparse==1.6.3
- async-timeout==4.0.2
- asynctest==0.13.0
- attrs==22.1.0
- backcall==0.2.0
- black==22.3.0
- brotli==1.0.9
- cachetools==5.2.0
- cffi==1.11.5
- chamfer==2.0.0
- chamferdist==1.0.0
- charset-normalizer==2.1.1
- click==8.1.3
- cloudpickle==2.2.0
- colorama==0.4.6
- configargparse==1.5.3
- cubic-feature-sampling==1.1.0
- cupy-cuda102==11.3.0
- cycler==0.11.0
- cython==0.29.32
- dash==2.6.2
- dash-core-components==2.0.0
- dash-html-components==2.0.0
- dash-table==5.0.0
- debugpy==1.6.3
- decorator==5.1.1
- docker-pycreds==0.4.0
- easydict==1.7
- efficientnet-pytorch==0.7.1
- entrypoints==0.4
- et-xmlfile==1.1.0
- fairscale==0.4.6
- fastjsonschema==2.16.2
- fastrlock==0.8.1
- flask==2.2.2
- flask-compress==1.13
- flatbuffers==22.11.23
- fonttools==4.38.0
- frozenlist==1.3.1
- fsspec==2022.10.0
- future==0.18.2
- fvcore==0.1.5.post20220512
- gast==0.4.0
- gitdb==4.0.9
- gitpython==3.1.29
- glumpy==1.0.6
- google-auth==2.13.0
- google-auth-oauthlib==0.4.6
- google-pasta==0.2.0
- gridding==2.1.0
- gridding-distance==1.0.0
- grpcio==1.50.0
- gym==0.26.2
- gym-notices==0.0.8
- h5py==3.7.0
- hydra-core==1.2.0
- idna==3.4
- imageio==2.22.2
- importlib-metadata==5.0.0
- importlib-resources==5.10.0
- imutils==0.5.4
- iopath==0.1.9
- ipykernel==6.16.2
- ipython==7.34.0
- ipywidgets==8.0.2
- itsdangerous==2.1.2
- jedi==0.18.1
- jinja2==3.1.2
- joblib==1.2.0
- jsonschema==4.16.0
- jupyter-client==7.4.4
- jupyter-core==4.11.2
- jupyterlab-widgets==3.0.3
- keras==2.11.0
- kiwisolver==1.4.4
- knn-cuda==0.2
- knn-nanoflann==0.0.0
- libclang==14.0.6
- llvmlite==0.39.1
- lmdb==0.94
- markdown==3.4.1
- markupsafe==2.1.1
- matplotlib==3.5.3
- matplotlib-inline==0.1.6
- mediapipe==0.9.0
- mouseinfo==0.1.3
- msgpack==1.0.4
- msgpack-numpy==0.4.8
- msvc-runtime==14.29.30133
- multidict==6.0.2
- multimethod==1.9.1
- mypy-extensions==0.4.3
- natsort==8.2.0
- nbformat==5.5.0
- nest-asyncio==1.5.6
- networkx==2.6.3
- normalspeed==0.0.1
- numba==0.56.4
- oauthlib==3.2.2
- omegaconf==2.2.3
- open3d==0.16.0
- opencv-contrib-python==3.4.2.16
- opencv-python==4.6.0.66
- openpyxl==3.0.10
- opt-einsum==3.3.0
- packaging==21.3
- pandas==1.3.5
- parso==0.8.3
- pathspec==0.10.1
- pathtools==0.1.2
- pefile==2023.2.7
- pickleshare==0.7.5
- pillow==9.3.0
- pkgutil-resolve-name==1.3.10
- platformdirs==2.5.2
- plotly==5.10.0
- plyfile==0.6
- pointnet2-ops==3.0.0
- pointops==0.0.0
- portalocker==2.6.0
- promise==2.3
- prompt-toolkit==3.0.31
- protobuf==3.19.6
- psutil==5.9.3
- pyasn1==0.4.8
- pyasn1-modules==0.2.8
- pyautogui==0.9.53
- pybind11==2.10.1
- pycocotools==2.0.5
- pycparser==2.21
- pycpd==2.0.0
- pydeprecate==0.3.2
- pydot==1.4.2
- pygetwindow==0.0.9
- pyglet==1.5.27
- pygments==2.13.0
- pyinstaller==5.11.0
- pyinstaller-hooks-contrib==2023.3
- pymeshlab==2022.2.post4
- pymsgbox==1.0.9
- pyparsing==3.0.9
- pyperclip==1.8.2
- pyqt5==5.15.7
- pyqt5-qt5==5.15.2
- pyqt5-sip==12.11.0
- pyrect==0.2.0
- pyrsistent==0.18.1
- pyscreeze==0.1.28
- python-dateutil==2.8.2
- pytorch-lightning==1.7.7
- pytweening==1.0.4
- pytz==2022.6
- pywavelets==1.3.0
- pywin32==304
- pywin32-ctypes==0.2.0
- pyyaml==6.0
- pyzmq==24.0.1
- requests==2.28.1
- requests-oauthlib==1.3.1
- rsa==4.9
- rtree==1.0.1
- scikit-image==0.19.3
- scikit-learn==1.0.2
- scipy==1.4.1
- seaborn==0.12.1
- sentry-sdk==1.10.1
- setproctitle==1.3.2
- setuptools==65.5.0
- shortuuid==1.0.9
- smmap==5.0.0
- tabulate==0.9.0
- tenacity==8.1.0
- tensorboard==2.11.0
- tensorboard-data-server==0.6.1
- tensorboard-plugin-wit==1.8.1
- tensorboardx==2.5.1
- tensorflow==2.11.0
- tensorflow-estimator==2.11.0
- tensorflow-intel==2.11.0
- tensorflow-io-gcs-filesystem==0.28.0
- tensorpack==0.11
- termcolor==2.0.1
- tflite-runtime==2.5.0
- thop==0.1.1-2209072238
- threadpoolctl==3.1.0
- tifffile==2021.11.2
- timm==0.4.5
- tomli==2.0.1
- torchmetrics==0.10.1
- tornado==6.2
- tqdm==4.64.1
- traitlets==5.5.0
- transforms3d==0.3.1
- triangle==20220202
- trimesh==3.21.5
- typed-ast==1.5.4
- urllib3==1.26.12
- wandb==0.13.4
- wcwidth==0.2.5
- werkzeug==2.2.2
- widgetsnbextension==4.0.3
- wrapt==1.14.1
- yacs==0.1.8
- yarl==1.8.1
- zipp==3.10.0
prefix: C:\Users\User\.conda\envs\dp
First, let me share my environment.yml with you. Most of the issues encountered during the compilation process were due to conflicts with the nvcc version or gcc. In my case, I also experienced the same error when the nvcc path was not properly set in the terminal used for compilation. Although the error message says 'RuntimeError: Error compiling objects for extension,' you will need to investigate the direct cause of this error. Find the cause of this error by making a break point in
File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1555, in _run_ninja_build
raise RuntimeError(message) from e
and check the error message, or please try to install pointops library here(https://github.com/POSTECH-CVLab/point-transformer)
Hello, my configuration is Ubuntu 22.04LTS GPU: 1080Ti, 4090 both tried gcc: 10,11,12 all tried libtorch(1.8.1),
following your install option, I first use torch(1.7.1) and cuda(11.0), and run
cd external_libs/pointops && python setup.py install
to installpointops
. But I comes to this error:Then I solve this issue by change version in a new env
conda install pytorch==1.2.0 torchvision==0.4.0 cudatoolkit=10.0 -c pytorch
, but another issue arise:I have no good ideal about it, can you give me some prompts?