nomewang / M3DM

MIT License
146 stars 19 forks source link

about the "knn_cuda" #33

Open wangwei83 opened 5 months ago

wangwei83 commented 5 months ago

(M3DM) wangwei-uestc@user-SYS-4029GP-TRT:/datadisk/wangwei/M3DM$ python main.py --method_name DINO+Point_MAE --memory_bank multiple --rgb_backbone_name vit_base_patch8_224_dino --xyz_backbone_name Point_MAE --save_feature Traceback (most recent call last): File "/home/wangwei-uestc/anaconda3/envs/M3DM/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1666, in _run_ninja_build subprocess.run( File "/home/wangwei-uestc/anaconda3/envs/M3DM/lib/python3.8/subprocess.py", line 516, in run raise CalledProcessError(retcode, process.args, 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 "main.py", line 2, in from m3dm_runner import M3DM File "/datadisk/wangwei/M3DM/m3dm_runner.py", line 5, in from feature_extractors import multiple_features File "/datadisk/wangwei/M3DM/feature_extractors/multiple_features.py", line 2, in from feature_extractors.features import Features File "/datadisk/wangwei/M3DM/feature_extractors/features.py", line 18, in from knn_cuda import KNN File "/home/wangwei-uestc/anaconda3/envs/M3DM/lib/python3.8/site-packages/knn_cuda/init.py", line 38, in _knn = load_cpp_ext("knn") File "/home/wangwei-uestc/anaconda3/envs/M3DM/lib/python3.8/site-packages/knn_cuda/init.py", line 26, in load_cpp_ext ext = load( File "/home/wangwei-uestc/anaconda3/envs/M3DM/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1080, in load return _jit_compile( File "/home/wangwei-uestc/anaconda3/envs/M3DM/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1293, in _jit_compile _write_ninja_file_and_build_library( File "/home/wangwei-uestc/anaconda3/envs/M3DM/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1405, in _write_ninja_file_and_build_library _run_ninja_build( File "/home/wangwei-uestc/anaconda3/envs/M3DM/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1682, in _run_ninja_build raise RuntimeError(message) from e RuntimeError: Error building extension 'knn': [1/2] /usr/bin/nvcc -DTORCH_EXTENSION_NAME=knn -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /home/wangwei-uestc/anaconda3/envs/M3DM/lib/python3.8/site-packages/torch/include -isystem /home/wangwei-uestc/anaconda3/envs/M3DM/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -isystem /home/wangwei-uestc/anaconda3/envs/M3DM/lib/python3.8/site-packages/torch/include/TH -isystem /home/wangwei-uestc/anaconda3/envs/M3DM/lib/python3.8/site-packages/torch/include/THC -isystem /home/wangwei-uestc/anaconda3/envs/M3DM/include/python3.8 -D_GLIBCXX_USE_CXX11_ABI=0 -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 --compiler-options '-fPIC' -DCUDA_HAS_FP16=1 -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS__ -std=c++14 -c /home/wangwei-uestc/anaconda3/envs/M3DM/lib/python3.8/site-packages/knn_cuda/csrc/cuda/knn.cu -o knn.cuda.o FAILED: knn.cuda.o /usr/bin/nvcc -DTORCH_EXTENSION_NAME=knn -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /home/wangwei-uestc/anaconda3/envs/M3DM/lib/python3.8/site-packages/torch/include -isystem /home/wangwei-uestc/anaconda3/envs/M3DM/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -isystem /home/wangwei-uestc/anaconda3/envs/M3DM/lib/python3.8/site-packages/torch/include/TH -isystem /home/wangwei-uestc/anaconda3/envs/M3DM/lib/python3.8/site-packages/torch/include/THC -isystem /home/wangwei-uestc/anaconda3/envs/M3DM/include/python3.8 -D_GLIBCXX_USE_CXX11_ABI=0 -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 --compiler-options '-fPIC' -DCUDA_HAS_FP16=1 -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS__ -std=c++14 -c /home/wangwei-uestc/anaconda3/envs/M3DM/lib/python3.8/site-packages/knn_cuda/csrc/cuda/knn.cu -o knn.cuda.o nvcc fatal : Unsupported gpu architecture 'compute_86' ninja: build stopped: subcommand failed.

wangwei83 commented 5 months ago

When I followed your method to do the installation pip install --upgrade https://github.com/unlimblue/KNN_CUDA/releases/download/0.2/KNN_CUDA-0.2-py3-none-any.whl

There are still the above errors

The conda list information is as follow (M3DM) wangwei-uestc@user-SYS-4029GP-TRT:/datadisk/wangwei/M3DM$ conda list packages in environment at /home/wangwei-uestc/anaconda3/envs/M3DM:

Name Version Build Channel _libgcc_mutex 0.1 main
_openmp_mutex 5.1 1_gnu
absl-py 2.1.0 pypi_0 pypi addict 2.4.0 pypi_0 pypi asttokens 2.4.1 pypi_0 pypi attrs 23.2.0 pypi_0 pypi backcall 0.2.0 pypi_0 pypi blinker 1.8.2 pypi_0 pypi ca-certificates 2024.2.2 hbcca054_0 conda-forge cachetools 5.3.3 pypi_0 pypi certifi 2024.2.2 pypi_0 pypi charset-normalizer 3.3.2 pypi_0 pypi click 8.1.7 pypi_0 pypi comm 0.2.2 pypi_0 pypi configargparse 1.7 pypi_0 pypi contourpy 1.1.1 pypi_0 pypi cycler 0.12.1 pypi_0 pypi dash 2.17.0 pypi_0 pypi dash-core-components 2.0.0 pypi_0 pypi dash-html-components 2.0.0 pypi_0 pypi dash-table 5.0.0 pypi_0 pypi decorator 5.1.1 pypi_0 pypi executing 2.0.1 pypi_0 pypi fastjsonschema 2.19.1 pypi_0 pypi filelock 3.14.0 pypi_0 pypi flask 3.0.3 pypi_0 pypi fonttools 4.51.0 pypi_0 pypi fsspec 2024.5.0 pypi_0 pypi google-auth 2.29.0 pypi_0 pypi google-auth-oauthlib 1.0.0 pypi_0 pypi grpcio 1.63.0 pypi_0 pypi huggingface-hub 0.23.0 pypi_0 pypi idna 3.7 pypi_0 pypi imageio 2.34.1 pypi_0 pypi importlib-metadata 7.1.0 pypi_0 pypi importlib-resources 6.4.0 pypi_0 pypi ipython 8.12.3 pypi_0 pypi ipywidgets 8.1.2 pypi_0 pypi itsdangerous 2.2.0 pypi_0 pypi jedi 0.19.1 pypi_0 pypi jinja2 3.1.4 pypi_0 pypi joblib 1.4.2 pypi_0 pypi jsonschema 4.22.0 pypi_0 pypi jsonschema-specifications 2023.12.1 pypi_0 pypi jupyter-core 5.7.2 pypi_0 pypi jupyterlab-widgets 3.0.10 pypi_0 pypi kiwisolver 1.4.5 pypi_0 pypi knn-cuda 0.2 pypi_0 pypi kornia 0.6.8 pypi_0 pypi lazy-loader 0.4 pypi_0 pypi ld_impl_linux-64 2.38 h1181459_1
libffi 3.4.4 h6a678d5_1
libgcc-ng 11.2.0 h1234567_1
libgomp 11.2.0 h1234567_1
libstdcxx-ng 11.2.0 h1234567_1
markdown 3.6 pypi_0 pypi markupsafe 2.1.5 pypi_0 pypi matplotlib 3.7.5 pypi_0 pypi matplotlib-inline 0.1.7 pypi_0 pypi nbformat 5.10.4 pypi_0 pypi ncurses 6.4 h6a678d5_0
nest-asyncio 1.6.0 pypi_0 pypi networkx 3.1 pypi_0 pypi ninja 1.10.2 h06a4308_5
ninja-base 1.10.2 hd09550d_5
numpy 1.24.4 pypi_0 pypi oauthlib 3.2.2 pypi_0 pypi open3d 0.18.0 pypi_0 pypi opencv-python 4.9.0.80 pypi_0 pypi openssl 3.0.13 h7f8727e_1
packaging 24.0 pypi_0 pypi pandas 2.0.3 pypi_0 pypi parso 0.8.4 pypi_0 pypi pexpect 4.9.0 pypi_0 pypi pickleshare 0.7.5 pypi_0 pypi pillow 10.3.0 pypi_0 pypi pip 24.0 py38h06a4308_0
pkgutil-resolve-name 1.3.10 pypi_0 pypi platformdirs 4.2.2 pypi_0 pypi plotly 5.22.0 pypi_0 pypi pointnet2-ops 3.0.0 pypi_0 pypi prompt-toolkit 3.0.43 pypi_0 pypi protobuf 5.26.1 pypi_0 pypi ptyprocess 0.7.0 pypi_0 pypi pure-eval 0.2.2 pypi_0 pypi pyasn1 0.6.0 pypi_0 pypi pyasn1-modules 0.4.0 pypi_0 pypi pygments 2.18.0 pypi_0 pypi pyparsing 3.1.2 pypi_0 pypi pyquaternion 0.9.9 pypi_0 pypi python 3.8.19 h955ad1f_0
python-dateutil 2.9.0.post0 pypi_0 pypi pytz 2024.1 pypi_0 pypi pywavelets 1.4.1 pypi_0 pypi pyyaml 6.0.1 pypi_0 pypi readline 8.2 h5eee18b_0
referencing 0.35.1 pypi_0 pypi requests 2.31.0 pypi_0 pypi requests-oauthlib 2.0.0 pypi_0 pypi retrying 1.3.4 pypi_0 pypi rpds-py 0.18.1 pypi_0 pypi rsa 4.9 pypi_0 pypi safetensors 0.4.3 pypi_0 pypi scikit-image 0.21.0 pypi_0 pypi scikit-learn 1.3.2 pypi_0 pypi scipy 1.10.1 pypi_0 pypi setuptools 59.5.0 pypi_0 pypi six 1.16.0 pypi_0 pypi sqlite 3.45.3 h5eee18b_0
stack-data 0.6.3 pypi_0 pypi tenacity 8.3.0 pypi_0 pypi tensorboard 2.14.0 pypi_0 pypi tensorboard-data-server 0.7.2 pypi_0 pypi threadpoolctl 3.5.0 pypi_0 pypi tifffile 2023.7.10 pypi_0 pypi timm 1.0.3 pypi_0 pypi tk 8.6.14 h39e8969_0
torch 1.9.0+cu111 pypi_0 pypi torchaudio 0.9.0 pypi_0 pypi torchvision 0.10.0+cu111 pypi_0 pypi tqdm 4.66.4 pypi_0 pypi traitlets 5.14.3 pypi_0 pypi typing-extensions 4.11.0 pypi_0 pypi tzdata 2024.1 pypi_0 pypi urllib3 2.2.1 pypi_0 pypi wcwidth 0.2.13 pypi_0 pypi werkzeug 3.0.3 pypi_0 pypi wget 3.2 pypi_0 pypi wheel 0.43.0 py38h06a4308_0
widgetsnbextension 4.0.10 pypi_0 pypi xz 5.4.6 h5eee18b_1
zipp 3.18.2 pypi_0 pypi zlib 1.2.13 h5eee18b_1

wliu23 commented 2 months ago

hi,我遇到过相同的问题,似乎是pytorch版本过新造成的,我从pytorch2.0.0降低为1.10.0后该问题得到了解决