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
{{ message }}
Repository navigation
Commit 13b41dc
Browse filesBrowse the repository at this point in the historyBrowse files
Add batched CPU and CUDA mesh rasterization (#1697)
Summary:
Pull Request resolved: #1697
Add batched mesh rasterization for animation sequences that share topology, camera, and model transform. CUDA renders the full batch with one two-dimensional grid for each initialization, rasterization, and resolve stage, and uses smaller per-triangle blocks for the common small-triangle workload. CPU batches use `dispenso::parallel_for` after releasing the Python GIL.
Extend `pymomentum.torch.renderer.rasterize_mesh` to accept positions shaped `[batch, vertices, 3]`, return padded `[batch, height, width]` outputs, and preserve the existing unbatched API. Add a benchmark covering CPU, native CUDA batching, sequential CUDA calls, and stream-parallel calls.
For a 3,658-triangle character at 256x256 and batch size 128, native CUDA batching reduced total render time from 5.47 ms to 0.89 ms. Dispenso CPU batching reached 12.3k frames/s compared with 1.4k frames/s for a single-frame loop.
Reviewed By: yutingye
Differential Revision: D125535570
fbshipit-source-id: a563740a213f734ae6e39848379391b0c27bacfb
0 commit comments