facebookresearch / pytorch3d

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

ImportError: /home/jun/miniconda3/envs/makeit3d/lib/python3.8/site-packages/pytorch3d/_C.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZN3c104cuda20CUDACachingAllocator9allocatorE #1724

Open junsukha opened 8 months ago

junsukha commented 8 months ago
Traceback (most recent call last):
  File "main.py", line 4, in <module>
    from nerf.provider import NeRFDataset
  File "/home/jun/Documents/Make-It-3D/nerf/provider.py", line 16, in <module>
    from .utils import get_rays, safe_normalize
  File "/home/jun/Documents/Make-It-3D/nerf/utils.py", line 26, in <module>
    from nerf.refine_utils import *
  File "/home/jun/Documents/Make-It-3D/nerf/refine_utils.py", line 9, in <module>
    from pytorch3d.renderer import compositing
  File "/home/jun/miniconda3/envs/makeit3d/lib/python3.8/site-packages/pytorch3d/renderer/__init__.py", line 7, in <module>
    from .blending import (
  File "/home/jun/miniconda3/envs/makeit3d/lib/python3.8/site-packages/pytorch3d/renderer/blending.py", line 10, in <module>
    from pytorch3d import _C
ImportError: /home/jun/miniconda3/envs/makeit3d/lib/python3.8/site-packages/pytorch3d/_C.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZN3c104cuda20CUDACachingAllocator9allocatorE

Ubuntu 22.04 CUDA toolkit 11.7 python 3.8.x

Commands I ran to install pytorhc3d. pip install torch==1.13.0+cu117 torchvision==0.14.0+cu117 torchaudio==0.13.0 --extra-index-url https://download.pytorch.org/whl/cu117

pip install git+https://github.com/facebookresearch/pytorch3d.git

I think it's a version issue. Is my installation process wrong? I'm using torch 1.13.0 and cu117 as above along with cuda toolkit 11.7 on my PC.

As I'm using cuda 11.7, I don't need this, right? :

If CUDA older than 11.7 is to be used and you are building from source, the CUB library must be available. We recommend version 1.10.0.

bottler commented 8 months ago

This looks like the version of pytorch used at pytorch3d build time is different from the version used at runtime.

Could environments have got confused somehow? Or could you have changed or added a version of torch in an environment?

Can you try doing the install in a completely new conda environemnt?