gaussian-splatting icon indicating copy to clipboard operation
gaussian-splatting copied to clipboard

CUDA error in _C.rasterize_gaussians(*args)

Open chiehwangs opened this issue 2 years ago • 9 comments
trafficstars

When running code, I encountered this issue that seems to occur in the rasterizer.

Is there any good solution or info for it ?

  File "train.py", line 296, in <module>
    training(lp.extract(args), op.extract(args), pp.extract(args), args.test_iterations, args.save_iterations, args.is_debug)
  File "train.py", line 111, in training
    render_pkg_re = render(viewpoint_cam, gaussians, grid, pipe, background, d_xyz, d_rotation, d_scaling, iteration)
  File "/media/data1/Gaussians/Gaussians/gaussian_renderer/__init__.py", line 129, in render
    cov3D_precomp=cov3D_precomp)
  File "/home/anaconda3/envs/gaussian_env/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/anaconda3/envs/gaussian_env/lib/python3.7/site-packages/diff_gaussian_rasterization/__init__.py", line 219, in forward
    raster_settings, 
  File "/home/anaconda3/envs/gaussian_env/lib/python3.7/site-packages/diff_gaussian_rasterization/__init__.py", line 41, in rasterize_gaussians
    raster_settings,
  File "/home/anaconda3/envs/gaussian_env/lib/python3.7/site-packages/diff_gaussian_rasterization/__init__.py", line 92, in forward
    num_rendered, color, depth, radii, geomBuffer, binningBuffer, imgBuffer = _C.rasterize_gaussians(*args)
RuntimeError: CUDA error: invalid configuration argument
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.

chiehwangs avatar Nov 11 '23 08:11 chiehwangs

This doesn't seem to be due to insufficient cuda memory as stackoverflow

chiehwangs avatar Nov 11 '23 11:11 chiehwangs

follow the hint to insert this line to program entry point: os.environ['CUDA_LAUNCH_BLOCKING'] = '1'

to avoid asynchronously-report bwtween CPU/host and GPU/device.

and paste error again?

of course, you can try decrease the gauss point-number.

yuedajiong avatar Nov 12 '23 02:11 yuedajiong

I had the same problem with a dataset I computed with COLMAP without the convert.py script. Changing the points3D.ply solved the problem. Computed the point cloud file with my GT data.

leblond14u avatar Mar 08 '24 14:03 leblond14u

@chiehwangs Did you solve this issue? I meet the same issue

TarzanZhao avatar Apr 29 '24 14:04 TarzanZhao

I have the same issue; if anyone solved it, that might be helpful.

antoinetdr avatar Jun 10 '24 15:06 antoinetdr

This happens when the input files can not be found where they are expected.

BSVogler avatar Jul 31 '24 13:07 BSVogler