Skip to content

Commit 2b3ed91

Browse files
Automated g4 rollback of changelist 149812908
PiperOrigin-RevId: 175626065
1 parent 7f02a3c commit 2b3ed91

2 files changed

Lines changed: 2 additions & 11 deletions

File tree

tensorflow/python/platform/app.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@
2525
from tensorflow.python.util.all_util import remove_undocumented
2626

2727

28-
def _benchmark_tests_can_log_memory():
29-
return True
30-
31-
3228
def _usage(shorthelp):
3329
"""Writes __main__'s docstring to stdout with some help text.
3430

tensorflow/python/platform/benchmark.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@
4343
# See also tensorflow/core/util/reporter.h TestReporter::kTestReporterEnv.
4444
TEST_REPORTER_TEST_ENV = "TEST_REPORT_FILE_PREFIX"
4545

46-
_benchmark_tests_can_log_memory = app._benchmark_tests_can_log_memory # pylint: disable=protected-access
47-
4846

4947
def _global_report_benchmark(
5048
name, iters=None, cpu_time=None, wall_time=None,
@@ -216,9 +214,8 @@ def run_op_benchmark(self,
216214
store the trace of iteration in the benchmark report.
217215
The trace will be stored as a string in Google Chrome trace format
218216
in the extras field "full_trace_chrome_format".
219-
store_memory_usage: Boolean, whether to run an extra
220-
untimed iteration, calculate memory usage, and store that in extras
221-
fields.
217+
store_memory_usage: Boolean, whether to run an extra untimed iteration,
218+
calculate memory usage, and store that in extras fields.
222219
name: (optional) Override the BenchmarkEntry name with `name`.
223220
Otherwise it is inferred from the top-level method name.
224221
extras: (optional) Dict mapping string keys to additional benchmark info.
@@ -230,8 +227,6 @@ def run_op_benchmark(self,
230227
A `dict` containing the key-value pairs that were passed to
231228
`report_benchmark`.
232229
"""
233-
store_memory_usage &= _benchmark_tests_can_log_memory()
234-
235230
for _ in range(burn_iters):
236231
sess.run(op_or_tensor, feed_dict=feed_dict)
237232

0 commit comments

Comments
 (0)