mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-08-02 20:02:49 +08:00
Summary: Implements the SE3 logarithm and exponential maps. (this is a second part of the split of D23326429) Outputs of `bm_se3`: ``` Benchmark Avg Time(μs) Peak Time(μs) Iterations -------------------------------------------------------------------------------- SE3_EXP_1 738 885 678 SE3_EXP_10 717 877 698 SE3_EXP_100 718 847 697 SE3_EXP_1000 729 1181 686 -------------------------------------------------------------------------------- Benchmark Avg Time(μs) Peak Time(μs) Iterations -------------------------------------------------------------------------------- SE3_LOG_1 1451 2267 345 SE3_LOG_10 2185 2453 229 SE3_LOG_100 2217 2448 226 SE3_LOG_1000 2455 2599 204 -------------------------------------------------------------------------------- ``` Reviewed By: patricklabatut Differential Revision: D27852557 fbshipit-source-id: e42ccc9cfffe780e9cad24129de15624ae818472
20 lines
502 B
Python
20 lines
502 B
Python
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
|
|
|
|
from fvcore.common.benchmark import benchmark
|
|
from test_se3 import TestSE3
|
|
|
|
|
|
def bm_se3() -> None:
|
|
kwargs_list = [
|
|
{"batch_size": 1},
|
|
{"batch_size": 10},
|
|
{"batch_size": 100},
|
|
{"batch_size": 1000},
|
|
]
|
|
benchmark(TestSE3.se3_expmap, "SE3_EXP", kwargs_list, warmup_iters=1)
|
|
benchmark(TestSE3.se3_logmap, "SE3_LOG", kwargs_list, warmup_iters=1)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
bm_se3()
|