You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue occurs only in the CUDA implementation, which generates face-indices much larger than possible (e.g. 1112276992 with only 506 verts in the example below).
I am unsure, when this happens, I have not been able to construct a case myself, it occurs rather randomly in my scripts.
There are no issues in the CPU-Implementation.
The stacktrace is the following:
/opt/conda/conda-bld/pytorch_1704987394225/work/aten/src/ATen/native/cuda/IndexKernel.cu:92: operator(): block: [0,0,0], thread: [0,0,0] Assertion `-sizes[i] <= index && index < sizes[i] && "index out of bounds"` failed.
Traceback (most recent call last):
File "/home/users/kaftan/miniconda3/envs/fissure2/lib/python3.10/site-packages/IPython/core/formatters.py", line 226, in catch_format_error
r = method(self, *args, **kwargs)
File "/home/users/kaftan/miniconda3/envs/fissure2/lib/python3.10/site-packages/IPython/core/formatters.py", line 711, in __call__
printer.pretty(obj)
File "/home/users/kaftan/miniconda3/envs/fissure2/lib/python3.10/site-packages/IPython/lib/pretty.py", line 394, in pretty
return self.type_pprinters[cls](obj, self, cycle)
File "/home/users/kaftan/miniconda3/envs/fissure2/lib/python3.10/site-packages/IPython/lib/pretty.py", line 641, in inner
p.pretty(x)
File "/home/users/kaftan/miniconda3/envs/fissure2/lib/python3.10/site-packages/IPython/lib/pretty.py", line 394, in pretty
return self.type_pprinters[cls](obj, self, cycle)
File "/home/users/kaftan/miniconda3/envs/fissure2/lib/python3.10/site-packages/IPython/lib/pretty.py", line 641, in inner
p.pretty(x)
File "/home/users/kaftan/miniconda3/envs/fissure2/lib/python3.10/site-packages/IPython/lib/pretty.py", line 411, in pretty
return _repr_pprint(obj, self, cycle)
File "/home/users/kaftan/miniconda3/envs/fissure2/lib/python3.10/site-packages/IPython/lib/pretty.py", line 779, in _repr_pprint
output = repr(obj)
File "/home/users/kaftan/miniconda3/envs/fissure2/lib/python3.10/site-packages/torch/_tensor.py", line 461, in __repr__
return torch._tensor_str._str(self, tensor_contents=tensor_contents)
File "/home/users/kaftan/miniconda3/envs/fissure2/lib/python3.10/site-packages/torch/_tensor_str.py", line 677, in _str
return _str_intern(self, tensor_contents=tensor_contents)
File "/home/users/kaftan/miniconda3/envs/fissure2/lib/python3.10/site-packages/torch/_tensor_str.py", line 597, in _str_intern
tensor_str = _tensor_str(self, indent)
File "/home/users/kaftan/miniconda3/envs/fissure2/lib/python3.10/site-packages/torch/_tensor_str.py", line 349, in _tensor_str
formatter = _Formatter(get_summarized_data(self) if summarize else self)
File "/home/users/kaftan/miniconda3/envs/fissure2/lib/python3.10/site-packages/torch/_tensor_str.py", line 137, in __init__
nonzero_finite_vals = torch.masked_select(
RuntimeError: CUDA error: device-side assert triggered
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.
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.
import torch
from pytorch3d.ops.marching_cubes import marching_cubes
vol = torch.load('vol.pth')
verts, faces = marching_cubes(vol, isolevel=0) # works fine
verts, faces = marching_cubes(vol.cuda(), isolevel=0) # index out of bounds
My environment (conda list). I installed pytorch3d via pip install "git+https://github.com/facebookresearch/pytorch3d.git".
Summary:
Fix an inclusive vs exclusive scan mix-up that was accidentally introduced when removing the Thrust dependency (`Thrust::exclusive_scan`) and reimplementing it using `at::cumsum` (which does an inclusive scan).
This fixes two Github reported issues:
* #1731
* #1751
Reviewed By: bottler
Differential Revision: D54605545
fbshipit-source-id: da9e92f3f8a9a35f7b7191428d0b9a9ca03e0d4d
🐛 Bugs / Unexpected behaviors
I am getting an index out of bounds in pytorch3d.ops.marching_cubes.py in line:
pytorch3d/pytorch3d/ops/marching_cubes.py
Line 299 in a27755d
The issue occurs only in the CUDA implementation, which generates face-indices much larger than possible (e.g. 1112276992 with only 506 verts in the example below).
I am unsure, when this happens, I have not been able to construct a case myself, it occurs rather randomly in my scripts.
There are no issues in the CPU-Implementation.
The stacktrace is the following:
Instructions To Reproduce the Issue:
Failure case volume: vol.pth.zip
Code to reproduce:
My environment (
conda list
). I installed pytorch3d viapip install "git+https://github.com/facebookresearch/pytorch3d.git"
.The text was updated successfully, but these errors were encountered: