Skip to content

Commit 32e3461

Browse files
zoyahavtfx-copybara
authored andcommitted
n/a
PiperOrigin-RevId: 552520065
1 parent d60307f commit 32e3461

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

struct2tensor/benchmarks/struct2tensor_benchmark_util.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
)
3636

3737
_BASE_DIR = os.path.join(os.path.dirname(__file__), "testdata")
38+
_CPU_INFO = cpuinfo.get_cpu_info()
3839

3940

4041
class Struct2tensorBenchmarksBase(parameterized.TestCase):
@@ -130,7 +131,7 @@ class ProtoDataBenchmarks(Struct2tensorBenchmarksBase):
130131
@classmethod
131132
def setUpClass(cls):
132133
super().setUpClass()
133-
print(f"cpuinfo: {cpuinfo.get_cpu_info()}")
134+
print(f"cpuinfo: {_CPU_INFO}")
134135

135136
shuffle_size = 2048
136137

@@ -232,6 +233,7 @@ def setUpClass(cls):
232233
for batch_size in batch_sizes
233234
]
234235

236+
# pylint: disable=protected-access
235237
cls._data = {
236238
"deep_protos":
237239
cls._deep_protos,
@@ -252,6 +254,7 @@ def setUpClass(cls):
252254
"tf_examples_100_features_100_values":
253255
cls._tf_examples_100_features_100_values,
254256
}
257+
# pylint: enable=protected-access
255258

256259

257260
class OpsBenchmarks(Struct2tensorBenchmarksBase):
@@ -261,7 +264,7 @@ class OpsBenchmarks(Struct2tensorBenchmarksBase):
261264
def setUpClass(cls):
262265
super().setUpClass()
263266

264-
print(f"cpuinfo: {cpuinfo.get_cpu_info()}")
267+
print(f"cpuinfo: {_CPU_INFO}")
265268
a = list(range(1000))
266269
b = list(range(1000))
267270

0 commit comments

Comments
 (0)