sdfstudio icon indicating copy to clipboard operation
sdfstudio copied to clipboard

tinycuda error

Open githubLeoliu opened this issue 2 years ago • 9 comments

I installed the tinycuda with the command

pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch

When I try import tinycudann, I got this error

`Traceback (most recent call last): File "", line 1, in File "/home/leo/anaconda3/envs/sdfstudio/lib/python3.10/site-packages/tinycudann/init.py", line 9, in from tinycudann.modules import free_temporary_memory, NetworkWithInputEncoding, Network, Encoding File "/home/leo/anaconda3/envs/sdfstudio/lib/python3.10/site-packages/tinycudann/modules.py", line 50, in C = importlib.import_module(f"tinycudann_bindings.{cc}_C") File "/home/leo/anaconda3/envs/sdfstudio/lib/python3.10/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ImportError: /home/leo/anaconda3/envs/sdfstudio/lib/python3.10/site-packages/tinycudann_bindings/_61_C.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZN3c104impl8GPUTrace13gpuTraceStateE

I tired this in following environment:` Ubuntu 22.04 python 10 pytroch 1.12.1+cu113

githubLeoliu avatar Jan 29 '23 05:01 githubLeoliu

Try installing via python -m pip ... maybe pip is installing to a different environment

Dawars avatar Jan 30 '23 17:01 Dawars

I tried python -m pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch still does not work.

how suppose I check if tinycudann is installed in correct environment explicitly?

githubLeoliu avatar Jan 30 '23 18:01 githubLeoliu

Is there anything in this directory? /home/leo/anaconda3/envs/sdfstudio/lib/python3.10/site-packages/tinycudann_bindings/

Search your computer for a file named _**_C.cpython-310-x86_64-linux-gnu.so

Or try to create a new env and paste here the output of tinycudann installation.

Dawars avatar Jan 30 '23 18:01 Dawars

leo@leo-Alienware-15-R3:~/anaconda3/envs/sdfstudio/lib/python3.10/site-packages/tinycudann_bindings$ ls _61_C.cpython-310-x86_64-linux-gnu.so

the _**_C.cpython-310-x86_64-linux-gnu.so file is under the correct directory in my environment

githubLeoliu avatar Jan 30 '23 20:01 githubLeoliu

You are right, I missed this part: undefined symbol: _ZN3c104impl8GPUTrace13gpuTraceStateE

What GPU do you have? Maybe this operation is not supported for gpu capability 6.1

PS: Maybe this is better asked at https://github.com/NVlabs/tiny-cuda-nn if using your custom code

Dawars avatar Jan 30 '23 20:01 Dawars

I have a GTX 1060, I also post an issue on tiny-cuda-nn repo.

githubLeoliu avatar Jan 30 '23 20:01 githubLeoliu

Local implementation

I got such dependecies: torch==1.12.1+cu113 and corresponding torchvision and torchaudio packages.(nvcc --version->11.3 in my case) Then executing the following codes

$ git clone --recursive https://github.com/nvlabs/tiny-cuda-nn
$ cd tiny-cuda-nn

and it works!

qsun1 avatar Feb 09 '23 05:02 qsun1

I tried a lots, and found the following methods works for me:

1.Clone the project first:

git clone --recursive https://github.com/nvlabs/tiny-cuda-nn

2.Go into the project folder:

cd tiny-cuda-nn    

3.Then build the project with cmake:

tiny-cuda-nn$ cmake . -B build
tiny-cuda-nn$ cmake --build build --config RelWithDebInfo -j

4.Enter the folder where setup.py is located:

cd tiny-cuda-nn/bindings/torch

5.Just run setup.py:

python setup.py install

6.If the following code does not report an error, it means that tinycudann is installed successfully!

python
>>> import tinycudann as tcnn

Then you can run according to the command provided by the author: git clone ... Hope it will help you!希望可以帮到大家^^有问题可以给我留言

Dawn11041107 avatar Jan 28 '24 03:01 Dawn11041107

@githubLeoliu got any fix for this finally ? I am getting the same error.

GARV-k avatar Jun 13 '24 22:06 GARV-k