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

index out of bounds #5

Open
pkqpotter123 opened this issue Dec 8, 2023 · 9 comments
Open

index out of bounds #5

pkqpotter123 opened this issue Dec 8, 2023 · 9 comments

Comments

@pkqpotter123
Copy link

I've encountered an array index out-of-bounds issue. Do you happen to know a solution? Thanks a lot.
anaconda3/envs/torch2/bin/python RegFormer/demo.py
anaconda3/envs/torch2/lib/python3.8/site-packages/torch/functional.py:445: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at /opt/conda/conda-bld/pytorch_1634272068694/work/aten/src/ATen/native/TensorShape.cpp:2157.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
/opt/conda/conda-bld/pytorch_1634272068694/work/aten/src/ATen/native/cuda/ScatterGatherKernel.cu:111: operator(): block: [17,0,0], thread: [0,0,0] Assertion idx_dim >= 0 && idx_dim < index_size && "index out of bounds" failed.
/opt/conda/conda-bld/pytorch_1634272068694/work/aten/src/ATen/native/cuda/ScatterGatherKernel.cu:111: operator(): block: [17,0,0], thread: [1,0,0] Assertion idx_dim >= 0 && idx_dim < index_size && "index out of bounds" failed.
/opt/conda/conda-bld/pytorch_1634272068694/work/aten/src/ATen/native/cuda/ScatterGatherKernel.cu:111: operator(): block: [17,0,0], thread: [2,0,0] Assertion idx_dim >= 0 && idx_dim < index_size && "index out of bounds" failed.
/opt/conda/conda-bld/pytorch_1634272068694/work/aten/src/ATen/native/cuda/ScatterGatherKernel.cu:111: operator(): block: [17,0,0], thread: [3,0,0] Assertion idx_dim >= 0 && idx_dim < index_size && "index out of bounds" failed.
/opt/conda/conda-bld/pytorch_1634272068694/work/aten/src/ATen/native/cuda/ScatterGatherKernel.cu:111: operator(): block: [39,0,0], thread: [32,0,0] Assertion idx_dim >= 0 && idx_dim < index_size && "index out of bounds" failed.
/opt/conda/conda-bld/pytorch_1634272068694/work/aten/src/ATen/native/cuda/ScatterGatherKernel.cu:111: operator(): block: [25,0,0], thread: [25,0,0] Assertion idx_dim >= 0 && idx_dim < index_size && "index out of bounds" failed.
Traceback (most recent call last):
File "torchRegFormer/demo.py", line 34, in
l0_q, l0_t, l1_q, l1_t, l2_q, l2_t, l3_q, l3_t, pc1_ouput, q_gt, t_gt, w_x, w_q = model([pos2], [pos1], T_gt, None, None)
File "/data/zzf/anaconda3/envs/torch2/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "torchRegFormer/regformer_model.py", line 522, in forward
l1_cost_volume = self.cost_volume3(l1_xyz_warp_proj_f1, l1_xyz_proj_f2, l1_points_warp_cross_proj_f1, l1_points_warp_cross_proj_f2) #FE1
File "/data/zzf/anaconda3/envs/torch2/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "torchRegFormer/conv_util.py", line 551, in forward
qi_xyz_grouped = torch.gather(xyz2_bn3, 1, neighbor_idx.unsqueeze(-1).repeat(1, 1, 3))
RuntimeError: CUDA error: device-side assert triggered

Process finished with exit code 1

Originally posted by @pkqpotter123 in #4 (comment)

@whqweqwe
Copy link

Have you solved this problem?

@pkqpotter123
Copy link
Author

I'm sorry, the issue has not been resolved yet. If there are any updates, feel free to communicate at any time.

@liujiuming123
Copy link
Collaborator

requirements.txt

@liujiuming123
Copy link
Collaborator

We release the docker environment list here. Hopefully it can address your problem.

@whqweqwe
Copy link

@pkqpotter123 How did you solve this problem: return F.conv2d(input, weight, bias, self.stride,
RuntimeError: cuDNN error: CUDNN_STATUS_INTERNAL_ERROR

@pkqpotter123
Copy link
Author

@pkqpotter123 你是如何解决这个问题的: return F.conv2d(input,weight,bias,self.stride, 运行时错误:cuDNN 错误:CUDNN_STATUS_INTERNAL_ERROR

I added the following line in the script: os.environ['CUDA_LAUNCH_BLOCKING'] = '1'。
The error CUDNN_STATUS_INTERNAL_ERROR is a general and non-specific error. The purpose of the code os.environ['CUDA_LAUNCH_BLOCKING'] = '1' is to make CUDA errors more detailed. After adding this line, the error became 'index out of bounds'

@pkqpotter123
Copy link
Author

We release the docker environment list here. Hopefully it can address your problem.

Thank you very much for your help.

@whqweqwe
Copy link

@pkqpotter123 Yes, but I used the author's requirements. txt and it still exists:perator(): block: [17,0,0], thread: [0,0,0] Assertion idx_dim >= 0 && idx_dim < index_size && "index out of bounds" failed.
Have you solved this problem?

@liujiuming123
Copy link
Collaborator

We found that the index setting inside our CUDA operator was wrong when we debugged the codes, and we have corrected it now. You can try to compile them again. Hopefully, this can help you well.

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

3 participants