tiny-cuda-nn icon indicating copy to clipboard operation
tiny-cuda-nn copied to clipboard

tinycudann ImportError: tinycudann_bindings/_80_C.cpython-38-x86_64-linux-gnu.so: undefined symbol:

Open FCInter opened this issue 11 months ago • 5 comments

I finished these steps:

$ git clone --recursive https://github.com/nvlabs/tiny-cuda-nn
$ cd tiny-cuda-nn
tiny-cuda-nn$ cmake . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo
tiny-cuda-nn$ cmake --build build --config RelWithDebInfo -j
tiny-cuda-nn$ cd bindings/torch
tiny-cuda-nn/bindings/torch$ python setup.py install

The final message printed is

Processing tinycudann-1.7-py3.8-linux-x86_64.egg
removing '/home/mypath/.conda/envs/nerfbusters/lib/python3.8/site-packages/tinycudann-1.7-py3.8-linux-x86_64.egg' (and everything under it)
creating /home/mypath/.conda/envs/nerfbusters/lib/python3.8/site-packages/tinycudann-1.7-py3.8-linux-x86_64.egg
Extracting tinycudann-1.7-py3.8-linux-x86_64.egg to /home/mypath/.conda/envs/nerfbusters/lib/python3.8/site-packages
Adding tinycudann 1.7 to easy-install.pth file

Installed /home/mypath/.conda/envs/nerfbusters/lib/python3.8/site-packages/tinycudann-1.7-py3.8-linux-x86_64.egg
Processing dependencies for tinycudann==1.7
Finished processing dependencies for tinycudann==1.7

No bug. Then I failed to import the tinycudann. My command is:

import tinycudann as tcnn

And the error is:

>>> import tinycudann as tcnn

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/mypath/projects/tiny-cuda-nn/bindings/torch/tinycudann/__init__.py", line 9, in <module>
    from tinycudann.modules import free_temporary_memory, NetworkWithInputEncoding, Network, Encoding
  File "/home/mypath/projects/tiny-cuda-nn/bindings/torch/tinycudann/modules.py", line 51, in <module>
    _C = importlib.import_module(f"tinycudann_bindings._{cc}_C")
  File "/home/mypath/.conda/envs/nerfbusters/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: /home/mypath/.conda/envs/nerfbusters/lib/python3.8/site-packages/tinycudann_bindings/_80_C.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZN3c104cuda20CUDACachingAllocator12recordStreamERKNS_7DataPtrENS0_10CUDAStreamE
>>>

What's wrong?

FCInter avatar Mar 15 '24 09:03 FCInter

same issue.

koyy001 avatar Apr 15 '24 07:04 koyy001

@FCInter i encountered the same error and can't solve it whatsoever. Did you find any solution?

NoctemNana avatar May 06 '24 21:05 NoctemNana

Any updates on possible solution?

Anji-Builds avatar Jul 08 '24 19:07 Anji-Builds

This solved my issue. https://github.com/bytedance/MVDream-threestudio/issues/26#issuecomment-2143418435

NoctemNana avatar Jul 08 '24 19:07 NoctemNana

@NoctemNana I have installed tiny cuda nn in my dockerfile outside the requirements.txt

image

and the docker is built successfully. But as was mentioned in the beginning of this issue, when I try to run the docker image and import the tinycudann It gives error.

image

Anji-Builds avatar Jul 08 '24 19:07 Anji-Builds