mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-08-02 20:02:49 +08:00
Summary: The shebang line `#!<path to interpreter>` is only required for Python scripts, so remove it on source files for class or function definitions. Additionally explicitly mark as executable the actual Python scripts in the codebase. Reviewed By: nikhilaravi Differential Revision: D20095778 fbshipit-source-id: d312599fba485e978a243292f88a180d71e1b55a
33 lines
796 B
Python
33 lines
796 B
Python
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
|
|
|
|
from fvcore.common.benchmark import benchmark
|
|
|
|
from test_obj_io import TestMeshObjIO
|
|
from test_ply_io import TestMeshPlyIO
|
|
|
|
|
|
def bm_save_load() -> None:
|
|
kwargs_list = [
|
|
{"V": 100, "F": 300},
|
|
{"V": 1000, "F": 3000},
|
|
{"V": 10000, "F": 30000},
|
|
]
|
|
benchmark(
|
|
TestMeshObjIO.load_obj_with_init,
|
|
"LOAD_OBJ",
|
|
kwargs_list,
|
|
warmup_iters=1,
|
|
)
|
|
benchmark(
|
|
TestMeshObjIO.save_obj_with_init,
|
|
"SAVE_OBJ",
|
|
kwargs_list,
|
|
warmup_iters=1,
|
|
)
|
|
benchmark(
|
|
TestMeshPlyIO.load_ply_bm, "LOAD_PLY", kwargs_list, warmup_iters=1
|
|
)
|
|
benchmark(
|
|
TestMeshPlyIO.save_ply_bm, "SAVE_PLY", kwargs_list, warmup_iters=1
|
|
)
|