sxyu / svox2

Plenoxels: Radiance Fields without Neural Networks
BSD 2-Clause "Simplified" License
2.79k stars 359 forks source link

Error in svox2.tv_grad_sparse : invalid device function #18

Open wen-yuan-zhang opened 2 years ago

wen-yuan-zhang commented 2 years ago

Hello, thanks for your excellent work! I tried to run your code after successfully installing svox2, jaxlib, nvidiacub. I ran

CUDA_VISIBLE_DEVICES=0 python opt.py data/nerf_synthetic/lego/ -t ckpt/paper_nerfsyn

but I received some problems such as "Error in svox2.accel_dist_prop : invalid device function". The total output is like the following:

Detected NeRF (Blender) dataset
LOAD DATA /data/zhangwenyuan/data/nerf_synthetic/lego/train
100%|█████████████████████████████████████████| 100/100 [00:02<00:00, 40.48it/s]
 Generating rays, scaling factor 1
Detected NeRF (Blender) dataset
LOAD DATA /data/zhangwenyuan/data/nerf_synthetic/lego/test
100%|█████████████████████████████████████████| 200/200 [00:04<00:00, 43.29it/s]
Error in svox2.accel_dist_prop : invalid device function
Render options RenderOptions(backend='cuvol', background_brightness=1.0, step_size=0.5, sigma_thresh=1e-08, stop_thresh=1e-07, last_sample_opaque=False, near_clip=0.0, use_spheric_clip=False, random_sigma_std=0.0, random_sigma_std_background=0.0)
 Selecting random rays
Eval step
  0%|                                                     | 0/5 [00:00<?, ?it/s]Error in svox2.volume_render_cuvol_image : invalid device function
Error in svox2.volume_render_cuvol_image : invalid device function
 40%|██████████████████                           | 2/5 [00:00<00:00, 12.62it/s]Error in svox2.volume_render_cuvol_image : invalid device function
Error in svox2.volume_render_cuvol_image : invalid device function
 80%|████████████████████████████████████         | 4/5 [00:00<00:00,  8.57it/s]Error in svox2.volume_render_cuvol_image : invalid device function
100%|█████████████████████████████████████████████| 5/5 [00:00<00:00,  9.60it/s]
eval stats: {'psnr': 3.719849289036856, 'mse': 0.4248954772949219}
Train step
  0%|                                                 | 0/12800 [00:00<?, ?it/s]Error in svox2.volume_render_cuvol_fused : invalid device function
Error in svox2.tv_grad_sparse : invalid device function
Error in svox2.tv_grad_sparse : invalid device function
Error in svox2.volume_render_cuvol_fused : invalid device function
Error in svox2.tv_grad_sparse : invalid device function
Error in svox2.tv_grad_sparse : invalid device function
Error in svox2.volume_render_cuvol_fused : invalid device function
Error in svox2.tv_grad_sparse : invalid device function
Error in svox2.tv_grad_sparse : invalid device function
Error in svox2.volume_render_cuvol_fused : invalid device function
epoch 0 psnr=1.10:   0%|                              | 0/12800 [00:00<?, ?it/s]Error in svox2.tv_grad_sparse : invalid device function
Error in svox2.tv_grad_sparse : invalid device function
Error in svox2.volume_render_cuvol_fused : invalid device function
Error in svox2.tv_grad_sparse : invalid device function
Error in svox2.tv_grad_sparse : invalid device function
Error in svox2.volume_render_cuvol_fused : invalid device function
Error in svox2.tv_grad_sparse : invalid device function
Error in svox2.tv_grad_sparse : invalid device function
Error in svox2.volume_render_cuvol_fused : invalid device function
Error in svox2.tv_grad_sparse : invalid device function
Error in svox2.tv_grad_sparse : invalid device function
epoch 0 psnr=1.10:   0%|                    | 31/12800 [00:00<00:41, 308.00it/s]Error in svox2.volume_render_cuvol_fused : invalid device function
Error in svox2.tv_grad_sparse : invalid device function
Error in svox2.tv_grad_sparse : invalid device function
Error in svox2.volume_render_cuvol_fused : invalid device function
Error in svox2.tv_grad_sparse : invalid device function

The process can continue, but PSNR doesnot seem to change. My Pytorch version is like the following:

PyTorch built with:
  - GCC 7.3
  - C++ Version: 201402
  - Intel(R) Math Kernel Library Version 2020.0.0 Product Build 20191122 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v1.6.0 (Git Hash 5ef631a030a6f73131c77892041042805a06064f)
  - OpenMP 201511 (a.k.a. OpenMP 4.5)
  - NNPACK is enabled
  - CPU capability usage: AVX2
  - CUDA Runtime 10.2
  - NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75
  - CuDNN 7.6.5
  - Magma 2.5.2
  - Build settings: BLAS=MKL, BUILD_TYPE=Release, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DUSE_VULKAN_WRAPPER -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Wno-stringop-overflow, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, USE_CUDA=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON

and my cuda version is 10.0.

I guess this problem may come from some version error, but I don't know how to solve it. I would appreciate it a lot if you can give me some advice. Thank you very much!

WXuanyang commented 2 years ago

Hi, I'm having the same issue as you mentioned above, did you find a way to solve it?

wen-yuan-zhang commented 2 years ago

Hi, I'm having the same issue as you mentioned above, did you find a way to solve it?

I changed a machine with cuda 11.4 and it worked. But I didn't make it on the previous 10.0 cuda machine at last.