mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-08-02 03:42:50 +08:00
Summary: Address black + isort fbsource linter warnings from D20558374 (previous diff) Reviewed By: nikhilaravi Differential Revision: D20558373 fbshipit-source-id: d3607de4a01fb24c0d5269634563a7914bddf1c8
31 lines
807 B
Python
31 lines
807 B
Python
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
|
|
|
|
|
|
from itertools import product
|
|
|
|
from fvcore.common.benchmark import benchmark
|
|
from test_pointclouds import TestPointclouds
|
|
|
|
|
|
def bm_compute_packed_padded_pointclouds() -> None:
|
|
kwargs_list = []
|
|
num_clouds = [32, 128]
|
|
max_p = [100, 10000]
|
|
feats = [1, 10, 300]
|
|
test_cases = product(num_clouds, max_p, feats)
|
|
for case in test_cases:
|
|
n, p, f = case
|
|
kwargs_list.append({"num_clouds": n, "max_p": p, "features": f})
|
|
benchmark(
|
|
TestPointclouds.compute_packed_with_init,
|
|
"COMPUTE_PACKED",
|
|
kwargs_list,
|
|
warmup_iters=1,
|
|
)
|
|
benchmark(
|
|
TestPointclouds.compute_padded_with_init,
|
|
"COMPUTE_PADDED",
|
|
kwargs_list,
|
|
warmup_iters=1,
|
|
)
|