Skip to content

Commit

Permalink
Fewer iterations of warmup calls in benchmarks
Browse files Browse the repository at this point in the history
Some benchmarks can be slow, warming up for too many iterations can lead the benchmark to run for too long.

PiperOrigin-RevId: 275531902
Change-Id: I1cae118d0432ce6ef7199abd9593a5bbbf1f6f75
  • Loading branch information
sun51 authored and tensorflower-gardener committed Oct 18, 2019
1 parent 47a0538 commit 78db146
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tensorflow/python/eager/benchmarks_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,7 @@ def run_benchmark(func, num_iters, execution_mode=None):
ctx = context.context()
with context.execution_mode(execution_mode):
# call func to warm up
for _ in xrange(100):
func()
func()
if execution_mode == context.ASYNC:
ctx.executor.wait()
start = time.time()
Expand Down

0 comments on commit 78db146

Please sign in to comment.