Skip to content

Commit 93a5ec7

Browse files
iindyktfx-copybara
authored andcommitted
Internal change.
PiperOrigin-RevId: 522388337
1 parent 49a7693 commit 93a5ec7

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

struct2tensor/benchmarks/struct2tensor_benchmark.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,6 @@
1414
r"""Benchmarks for struct2tensor.
1515
1616
17-
Usage:
18-
blaze run -c opt --dynamic_mode=off \
19-
--run_under='perflab \
20-
--constraints=arch=x86_64,platform_family=iota,platform_genus=sandybridge' \
21-
//struct2tensor/benchmarks:struct2tensor_benchmark \
22-
-- --notest_mode
23-
24-
2517
"""
2618

2719
from absl.testing import parameterized

struct2tensor/benchmarks/struct2tensor_benchmark_util.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@
3131

3232
flags.DEFINE_bool(
3333
"test_mode", False,
34-
"if True, run all benchmarks with one iteration to make sure there is no error."
34+
"if True, run all benchmarks with two iterations."
3535
)
3636

37-
_BASE_DIR = "struct2tensor/benchmarks/testdata"
37+
_BASE_DIR = os.path.join(os.path.dirname(__file__), "testdata")
3838

3939

4040
class Struct2tensorBenchmarksBase(parameterized.TestCase):
@@ -65,7 +65,7 @@ def run_benchmarks(self, fn_name, get_benchmark_fn, fn_args, data_key):
6565
"Wall Time avg(ms)\tWall Time std\tUser CPU avg (ms)\t"
6666
"User CPU std\tSystem CPU avg (ms)\tSystem CPU std")
6767

68-
iterations = 10000
68+
iterations = 1000
6969
# This is the number of iterations in a sample. We will benchmark the
7070
# total compute time per sample. And find std across all samples.
7171
sample_size = 100

0 commit comments

Comments
 (0)