facebookresearch / pytorch3d

PyTorch3D is FAIR's library of reusable components for deep learning with 3D data
https://pytorch3d.org/
Other
8.49k stars 1.28k forks source link

RuntimeError: Not compiled with GPU support when running knn #1787

Open Russ-Yan opened 2 months ago

Russ-Yan commented 2 months ago

File "/home/yyr/SHSnet/SHS-Net-main/net/network.py", line 173, in forward _, knnidx, = knn_points(pcl_pat, pcl_pat, K=self.encode_knn+1, return_nn=False) # (B, N, K+1) File "/home/yyr/miniconda3/envs/FN1/lib/python3.8/site-packages/pytorch3d/ops/knn.py", line 187, in knn_points p1_dists, p1_idx = _knn_points.apply( File "/home/yyr/miniconda3/envs/FN1/lib/python3.8/site-packages/pytorch3d/ops/knn.py", line 72, in forward idx, dists = _C.knn_points_idx(p1, p2, lengths1, lengths2, norm, K, version) RuntimeError: Not compiled with GPU support.

bottler commented 1 month ago

Please give more details - as explained in the issue template. How did you install? What is in your environment?

Russ-Yan commented 1 month ago
  1. I installed pytorch3d from source: pip install "git+https://github.com/facebookresearch/pytorch3d.git@stable"
  2. I run this code in Ubuntu 22.04.2 LTS system。
  3. here is my conda list:

    Name Version Build Channel

    _libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 2_kmp_llvm conda-forge absl-py 2.0.0 pyhd8ed1ab_0 conda-forge addict 2.4.0 pypi_0 pypi aiohttp 3.8.6 pypi_0 pypi aiosignal 1.3.1 pypi_0 pypi ansi2html 1.8.0 pypi_0 pypi anyio 3.7.1 pypi_0 pypi appdirs 1.4.4 pypi_0 pypi argon2-cffi 23.1.0 pypi_0 pypi argon2-cffi-bindings 21.2.0 pypi_0 pypi async-timeout 4.0.3 pypi_0 pypi asynctest 0.13.0 pypi_0 pypi attrs 23.1.0 pypi_0 pypi backcall 0.2.0 pypi_0 pypi beautifulsoup4 4.12.2 pypi_0 pypi blas 1.0 mkl defaults bleach 6.0.0 pypi_0 pypi brotli-python 1.0.9 py37hd23a5d3_7 conda-forge bzip2 1.0.8 hd590300_5 conda-forge c-ares 1.21.0 hd590300_0 conda-forge ca-certificates 2023.7.22 hbcca054_0 conda-forge certifi 2023.7.22 pyhd8ed1ab_0 conda-forge cffi 1.15.1 pypi_0 pypi charset-normalizer 3.3.2 pyhd8ed1ab_0 conda-forge click 8.1.7 pypi_0 pypi comm 0.1.4 pypi_0 pypi configargparse 1.7 pypi_0 pypi cudatoolkit 11.3.1 h2bc3f7f_2 defaults curl 8.2.1 h37d81fd_0 defaults cycler 0.11.0 pypi_0 pypi cython 3.0.8 pypi_0 pypi dash 2.14.1 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 debugpy 1.7.0 pypi_0 pypi decorator 5.1.1 pypi_0 pypi defusedxml 0.7.1 pypi_0 pypi docker-pycreds 0.4.0 pypi_0 pypi entrypoints 0.4 pypi_0 pypi exceptiongroup 1.2.0 pypi_0 pypi expat 2.5.0 hcb278e6_1 conda-forge fastjsonschema 2.18.1 pypi_0 pypi ffmpeg 4.3 hf484d3e_0 pytorch flask 2.2.5 pypi_0 pypi fonttools 4.38.0 pypi_0 pypi freetype 2.12.1 h267a509_2 conda-forge frozenlist 1.3.3 pypi_0 pypi fsspec 2023.1.0 pypi_0 pypi fvcore 0.1.5.post20221221 pypi_0 pypi gettext 0.21.1 h27087fc_0 conda-forge giflib 5.2.1 h0b41bf4_3 conda-forge git 2.40.1 pl5340h4fa2fa2_1 defaults gitdb 4.0.11 pyhd8ed1ab_0 conda-forge gitpython 3.1.18 pyhd3eb1b0_1 defaults gmp 6.3.0 h59595ed_0 conda-forge gnutls 3.6.15 he1e5248_0 defaults grpcio 1.42.0 py37hce63b2e_0 defaults icu 73.2 h59595ed_0 conda-forge idna 3.4 pyhd8ed1ab_0 conda-forge importlib-metadata 6.7.0 pypi_0 pypi importlib-resources 5.12.0 pypi_0 pypi iopath 0.1.10 pypi_0 pypi ipykernel 6.16.2 pypi_0 pypi ipython 7.34.0 pypi_0 pypi ipython-genutils 0.2.0 pypi_0 pypi ipywidgets 8.1.1 pypi_0 pypi itsdangerous 2.1.2 pypi_0 pypi jedi 0.19.1 pypi_0 pypi jinja2 3.1.2 pypi_0 pypi joblib 1.3.1 pypi_0 pypi jpeg 9e h0b41bf4_3 conda-forge jsonschema 4.17.3 pypi_0 pypi jupyter-client 7.4.9 pypi_0 pypi jupyter-core 4.12.0 pypi_0 pypi jupyter-server 1.24.0 pypi_0 pypi jupyterlab-pygments 0.2.2 pypi_0 pypi jupyterlab-widgets 3.0.9 pypi_0 pypi keyutils 1.6.1 h166bdaf_0 conda-forge kiwisolver 1.4.5 pypi_0 pypi krb5 1.20.1 hf9c8cef_0 conda-forge lame 3.100 h166bdaf_1003 conda-forge lcms2 2.15 hfd0df8a_0 conda-forge ld_impl_linux-64 2.40 h41732ed_0 conda-forge lerc 3.0 h295c915_0 defaults libcurl 8.2.1 h91b91d3_0 defaults libdeflate 1.17 h5eee18b_1 defaults libedit 3.1.20191231 he28a2e2_2 conda-forge libev 4.33 h516909a_1 conda-forge libexpat 2.5.0 hcb278e6_1 conda-forge libffi 3.3 h58526e2_2 conda-forge libgcc-ng 13.2.0 h807b86a_3 conda-forge libhwloc 2.9.3 default_h554bfaf_1009 conda-forge libiconv 1.17 h166bdaf_0 conda-forge libidn2 2.3.4 h166bdaf_0 conda-forge libnghttp2 1.52.0 ha637b67_1 defaults libnsl 2.0.1 hd590300_0 conda-forge libpng 1.6.39 h753d276_0 conda-forge libprotobuf 3.15.8 h780b84a_1 conda-forge libsqlite 3.44.0 h2797004_0 conda-forge libssh2 1.10.0 h37d81fd_2 defaults libstdcxx-ng 13.2.0 h7e041cc_3 conda-forge libtasn1 4.19.0 h166bdaf_0 conda-forge libtiff 4.5.1 h6a678d5_0 defaults libunistring 0.9.10 h7f98852_0 conda-forge libuv 1.46.0 hd590300_0 conda-forge libwebp 1.2.4 h11a3e52_1 defaults libwebp-base 1.2.4 h5eee18b_1 defaults libxml2 2.11.5 h232c23b_1 conda-forge libzlib 1.2.13 hd590300_5 conda-forge lightning-utilities 0.10.0 pypi_0 pypi llvm-openmp 17.0.4 h4dfa4b3_0 conda-forge markdown 3.5.1 pyhd8ed1ab_0 conda-forge markupsafe 2.1.3 pypi_0 pypi matplotlib 3.5.3 pypi_0 pypi matplotlib-inline 0.1.6 pypi_0 pypi mistune 3.0.2 pypi_0 pypi mkl 2021.4.0 h8d4b97c_729 conda-forge mkl-service 2.4.0 py37h402132d_0 conda-forge mkl_fft 1.3.1 py37hd3c417c_0 defaults mkl_random 1.2.2 py37h51133e4_0 defaults multidict 6.0.4 pypi_0 pypi nbclassic 1.0.0 pypi_0 pypi nbclient 0.7.4 pypi_0 pypi nbconvert 7.6.0 pypi_0 pypi nbformat 5.7.0 pypi_0 pypi ncurses 6.4 h59595ed_2 conda-forge nest-asyncio 1.5.8 pypi_0 pypi nettle 3.7.3 hbbd107a_1 defaults networkx 2.6.3 pypi_0 pypi notebook 6.5.6 pypi_0 pypi notebook-shim 0.2.3 pypi_0 pypi numpy 1.21.6 pypi_0 pypi numpy-base 1.21.5 py37ha15fc14_3 defaults open3d 0.17.0 pypi_0 pypi open3d-python 0.7.0.0 pypi_0 pypi openh264 2.1.1 h4ff587b_0 defaults openssl 1.1.1w hd590300_0 conda-forge packaging 23.1 pypi_0 pypi pandas 1.3.5 pypi_0 pypi pandocfilters 1.5.0 pypi_0 pypi parso 0.8.3 pypi_0 pypi pcre2 10.42 hcad00b1_0 conda-forge perl 5.32.1 4_hd590300_perl5 conda-forge pexpect 4.8.0 pypi_0 pypi pickleshare 0.7.5 pypi_0 pypi pillow 9.4.0 py37h6a678d5_0 defaults pip 22.3.1 py37h06a4308_0 defaults pkgutil-resolve-name 1.3.10 pypi_0 pypi plotly 5.18.0 pypi_0 pypi plyfile 0.9 pypi_0 pypi point-cloud-utils 0.30.0 pypi_0 pypi portalocker 2.7.0 pypi_0 pypi prometheus-client 0.17.1 pypi_0 pypi prompt-toolkit 3.0.39 pypi_0 pypi protobuf 4.23.4 pypi_0 pypi psutil 5.9.6 pypi_0 pypi ptyprocess 0.7.0 pypi_0 pypi pycparser 2.21 pypi_0 pypi pygments 2.16.1 pypi_0 pypi pyparsing 3.1.1 pypi_0 pypi pypoisson 0.10 pypi_0 pypi pyquaternion 0.9.9 pypi_0 pypi pyrsistent 0.19.3 pypi_0 pypi pysocks 1.7.1 py37h89c1867_5 conda-forge python 3.7.11 h12debd9_0 defaults python-dateutil 2.8.2 pypi_0 pypi python_abi 3.7 2_cp37m conda-forge pytorch 1.11.0 py3.7_cuda11.3_cudnn8.2.0_0 pytorch pytorch-lightning 1.9.5 pypi_0 pypi pytorch-mutex 1.0 cuda pytorch pytorch3d 0.7.6 pypi_0 pypi pytz 2023.3.post1 pypi_0 pypi pyyaml 6.0.1 pypi_0 pypi pyzmq 24.0.1 pypi_0 pypi readline 8.2 h8228510_1 conda-forge requests 2.31.0 pyhd8ed1ab_0 conda-forge retrying 1.3.4 pypi_0 pypi scikit-learn 1.0.2 pypi_0 pypi scipy 1.7.3 pypi_0 pypi send2trash 1.8.2 pypi_0 pypi sentry-sdk 1.35.0 pypi_0 pypi setproctitle 1.3.3 pypi_0 pypi setuptools 68.2.2 pyhd8ed1ab_0 conda-forge six 1.16.0 pyh6c4a22f_0 conda-forge smmap 5.0.0 pyhd8ed1ab_0 conda-forge sniffio 1.3.0 pypi_0 pypi soupsieve 2.4.1 pypi_0 pypi sqlite 3.44.0 h2c6b66d_0 conda-forge tabulate 0.9.0 pypi_0 pypi tbb 2021.10.0 h00ab1b0_2 conda-forge tenacity 8.2.3 pypi_0 pypi tensorboard 1.15.0 py37_0 conda-forge tensorboardx 2.6.2 pypi_0 pypi termcolor 2.3.0 pypi_0 pypi terminado 0.17.1 pypi_0 pypi threadpoolctl 3.1.0 pypi_0 pypi tinycss2 1.2.1 pypi_0 pypi tk 8.6.13 noxft_h4845f30_101 conda-forge torch 1.10.0+cu111 pypi_0 pypi torch-cluster 1.6.1 pypi_0 pypi torch-geometric 2.3.1 pypi_0 pypi torchaudio 0.11.0 py37_cu113 pytorch torchmetrics 0.11.4 pypi_0 pypi torchvision 0.12.0 py37_cu113 pytorch tornado 6.2 pypi_0 pypi tqdm 4.66.1 pypi_0 pypi traitlets 5.9.0 pypi_0 pypi typing-extensions 4.7.1 pypi_0 pypi typing_extensions 4.5.0 pyha770c72_0 conda-forge urllib3 2.0.7 pyhd8ed1ab_0 conda-forge wandb 0.16.0 pypi_0 pypi wcwidth 0.2.8 pypi_0 pypi webencodings 0.5.1 pypi_0 pypi websocket-client 1.6.1 pypi_0 pypi werkzeug 2.2.3 pypi_0 pypi wheel 0.41.3 pyhd8ed1ab_0 conda-forge widgetsnbextension 4.0.9 pypi_0 pypi xz 5.4.2 h5eee18b_0 defaults yacs 0.1.8 pypi_0 pypi yarl 1.9.4 pypi_0 pypi zipp 3.15.0 pypi_0 pypi zlib 1.2.13 hd590300_5 conda-forge zstd 1.5.5 hfc55251_0 conda-forge

bottler commented 1 month ago

Something isn't quite right with the environment. You have cudatoolkit 11.3 but torch built for cuda 11.1. It's recommended to install dependencies as conda packages - see INSTALL.md - which makes it easier to get things right. I would start again in a new environment.

Another useful trick is that you could set FORCE_CUDA=1 in the environment when you build pytorch3d. This should mean that if something's wrong with CUDA you will get an error rather than a cpu-only build.