torchmcubes
torchmcubes copied to clipboard
Fix the input numel issue
Fix the "numel needs to be smaller than int32_t max; otherwise, please use packed_accessor64" issue.
verts, faces = self.mc_func(level.to(get_rank()), threshold)
File "/usr/local/lib/python3.10/dist-packages/torchmcubes/__init__.py", line 12, in marching_cubes
return mc.mcubes_cuda(vol, thresh)
RuntimeError: numel needs to be smaller than int32_t max; otherwise, please use packed_accessor64
The above issue happens when trying to run marching cubes with mcubes_cuda on large volumes input like 512^3. And the issue will not happen when with small volumes like input 256^3.
Hi, @yuanxion. Thank you very much for your PR. Excuse me, but please allow me have some more time to review the update.
Best, Tatsuya