Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CUDA isn't working #13

Open
decadance-dance opened this issue Dec 15, 2021 · 6 comments
Open

CUDA isn't working #13

decadance-dance opened this issue Dec 15, 2021 · 6 comments

Comments

@decadance-dance
Copy link

I finished installing COLMAP and creating env with requirements.
When i run python render_imgs_circle.py
I have got CUDA exception.

/home/NIX/dronov/anaconda3/envs/plenoxel/lib/python3.8/site-packages/svox2/utils.py:39: UserWarning: CUDA extension svox2.csrc could not be loaded! Operations will be slow.
Please do not import svox in the svox2 source directory.
  warn("CUDA extension svox2.csrc could not be loaded! " +
Detected NeRF (Blender) dataset
LOAD DATA /home/NIX/dronov/HDD/datasets/3D/256_to_512_fasttv/ficus/data/test
100%|█████████████████████████████████████████| 200/200 [00:04<00:00, 43.17it/s]
  Auto vec_up [-5.03970733e-04  8.00918526e-03  9.99967799e-01]
Traceback (most recent call last):
  File "render_imgs_circle.py", line 166, in <module>
    grid = svox2.SparseGrid.load(args.ckpt, device=device)
  File "/home/NIX/dronov/anaconda3/envs/plenoxel/lib/python3.8/site-packages/svox2/svox2.py", line 1627, in load
    grid.accelerate()
  File "/home/NIX/dronov/anaconda3/envs/plenoxel/lib/python3.8/site-packages/svox2/svox2.py", line 1491, in accelerate
    assert (
AssertionError: CUDA extension is currently required for accelerate

Help me fix it, please

@sxyu
Copy link
Owner

sxyu commented Dec 15, 2021

Hi,
This means that the CUDA extension failed to build.
Did you run pip install . on the svox2 root? If so, did you see any errors/warnings when doing so?
Also, what is your GPU and CUDA version?

@Fangkang515
Copy link

This seems to be a general problem, I have the same error:

    assert (
AssertionError: CUDA extension is currently required for accelerate

and, my cuda version shows below:

image
GPU is 1080Ti.

Do you have any idea to fix it? Help me please. Thank you very much!

@Realitian
Copy link

Realitian commented Dec 16, 2021

I also got Please do not import svox in the svox2 source directory, when I run the to_svox1.py.
For the debugging, I tried to just import svox and svox2 only in python file.
But, when I import one svox or svox2, then above message does not show. but if I import both svox and svox2 at the same time, then I can get this message.
I am curious if two cuda module has conflict.
Could you give me hint to resolve this issue when I run the to_svox1.py, @sxyu ?
Thank you in advance for your help!

@SSground
Copy link

I have the same problem, but this does not seem to affect the final result

@yyang9887
Copy link

I have the same error.

Traceback (most recent call last):
File "opt.py", line 285, in
grid = svox2.SparseGrid(reso=reso_list[reso_id],
File "/home/iaj/.conda/envs/plenoxel/lib/python3.8/site-packages/svox2/svox2.py", line 535, in init
self.accelerate()
File "/home/iaj/.conda/envs/plenoxel/lib/python3.8/site-packages/svox2/svox2.py", line 1491, in accelerate
assert (
AssertionError: CUDA extension is currently required for accelerate

@decadance-dance
Copy link
Author

I fixed it for myself.
First, look at your GPU drivers and their CUDA compatibility.
You must have a full CUDA driver installed.
I installed myself version 11.3. https://developer.nvidia.com/cuda-11.3.0-download-archive?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=20.04&target_type=deb_local
After installing CUDA, I registered the paths CUDA_HOME, CUB_HOME
Next, I collected the environment.

conda env create -f environment.yml
conda activate plenoxels

Make sure that your conda environment does not already have libraries related to svox2 and svox. And manually executed the command python setup.py install from the root of the repository. After that, I ran the command pip install .
The svox2 library appeared in the trace in the list of libraries in my environment. Attention, avoid the simultaneous presence of svox2 and svox in the environment.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants