torchmcubes icon indicating copy to clipboard operation
torchmcubes copied to clipboard

Fix the input numel issue

Open yuanxion opened this issue 2 years ago • 2 comments

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

yuanxion avatar Jul 28 '23 11:07 yuanxion

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.

yuanxion avatar Jul 28 '23 11:07 yuanxion

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

tatsy avatar Aug 01 '23 11:08 tatsy