mesh rasterizer settings fix

Summary:
Fix default setting of `max_faces_per_bin` and update mesh rasterization benchmark tests.
The previous setting of `max_faces_per_bin` was wrong and for larger mesh sizes and batch sizes it was causing a significant slow down due to an unecessarily large intermediate tensor being created.

Reviewed By: gkioxari

Differential Revision: D22301819

fbshipit-source-id: d5e817f5b917fb5633c9c6a8634b6c8ff65e3508
This commit is contained in:
Nikhila Ravi
2020-06-30 12:42:42 -07:00
committed by Facebook GitHub Bot
parent 88f579389f
commit dd4a35cf9f
3 changed files with 49 additions and 30 deletions

View File

@@ -130,7 +130,7 @@ def rasterize_meshes(
)
if max_faces_per_bin is None:
max_faces_per_bin = int(max(10000, verts_packed.shape[0] / 5))
max_faces_per_bin = int(max(10000, meshes._F / 5))
# pyre-fixme[16]: `_RasterizeFaceVerts` has no attribute `apply`.
return _RasterizeFaceVerts.apply(