-
Notifications
You must be signed in to change notification settings - Fork 122
RuntimeError: CUDA error: device-side assert triggered #22
Comments
It's hard to tell without knowing the exact config, but does this issue seem to help you? |
I tried reducing the chunk size and the num of layers. But the error still persists. Besides, I do not have issues with gpu memory. |
I think the number of labels is wrong,causes error when calculating loss value |
but there is no number of labels involved as per my understanding |
|
@krrish94 Following the preview comment: usage of this tensor: |
More update: Actually these large values of indices are coming from func torchsearchsorted.searchsorted() |
It may be related to the issue you created for searchsorted() @krrish94 |
I replaced torchsearchsorted.searchsorted() with official torch.searchsorted(), now the error is gone and in runs successfully, though I am not sure influence on performance due to this change. I think it may be worth mentioning somewhere because I spent some time to get this :) Thank you! |
Thanks so much for digging into this! From a skim this appears to be due to a weird config that's potentially leading to indexing errors. I'd trust the newer torch searchsorted function as opposed to the external package. |
can you update your code?because I change my code but it's not work |
I think you can try to upgrade your python's libraries, such as numpy and so on,I do that and succed run it |
Dear Author,
Thank you for the cool implementation.
I installed successfully and tried to run "python train_nerf.py --config config/lego.yml"
But I am getting RuntimeError: CUDA error: device-side assert triggered.
Traceback (most recent call last):
File "train_nerf.py", line 404, in
main()
File "train_nerf.py", line 240, in main
encode_direction_fn=encode_direction_fn,
File "/home/aswamy/github_repos/NeRF/nerf-pytorch-krish/nerf-pytorch/nerf/train_utils.py", line 180, in run_one_iter_of_nerf
for batch in batches
File "/home/aswamy/github_repos/NeRF/nerf-pytorch-krish/nerf-pytorch/nerf/train_utils.py", line 180, in
for batch in batches
File "/home/aswamy/github_repos/NeRF/nerf-pytorch-krish/nerf-pytorch/nerf/train_utils.py", line 115, in predict_and_render_radiance
encode_direction_fn,
File "/home/aswamy/github_repos/NeRF/nerf-pytorch-krish/nerf-pytorch/nerf/train_utils.py", line 11, in run_network
embedded = embed_fn(pts_flat)
File "/home/aswamy/github_repos/NeRF/nerf-pytorch-krish/nerf-pytorch/nerf/nerf_helpers.py", line 166, in
x, num_encoding_functions, include_input, log_sampling
File "/home/aswamy/github_repos/NeRF/nerf-pytorch-krish/nerf-pytorch/nerf/nerf_helpers.py", line 138, in positional_encoding
device=tensor.device,
File "/home/aswamy/tools/anaconda3/envs/nerf-pytorch-krish/lib/python3.7/site-packages/torch/tensor.py", line 27, in wrapped
return f(*args, **kwargs)
File "/home/aswamy/tools/anaconda3/envs/nerf-pytorch-krish/lib/python3.7/site-packages/torch/tensor.py", line 547, in rpow
return torch.tensor(other, dtype=dtype, device=self.device) ** self
RuntimeError: CUDA error: device-side assert triggered
Any suggestions to solve this?
Thank you!
The text was updated successfully, but these errors were encountered: