Skip to content

Commit

Permalink
Remove no-op aot_compilation_time (#142490)
Browse files Browse the repository at this point in the history
Summary:
Signed-off-by: Edward Z. Yang <[email protected]>

X-link: pytorch/pytorch#142490
Approved by: https://github.com/xuzhao9

Reviewed By: clee2000

Differential Revision: D67100579

Pulled By: ezyang

fbshipit-source-id: 32cda9a19663fbde793a15935468670adfd70f3d
  • Loading branch information
ezyang authored and facebook-github-bot committed Dec 12, 2024
1 parent 675fb8f commit 2dd3e11
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions userbenchmark/dynamo/dynamobench/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -3272,13 +3272,9 @@ def warmup(fn, model, example_inputs, mode, niters=10):
)

if self.args.export_aot_inductor:
t_0 = time.perf_counter()
optimized_model_iter_fn = optimize_ctx
t_1 = time.perf_counter()
aot_compilation_time = t_1 - t_0
else:
optimized_model_iter_fn = optimize_ctx(self.model_iter_fn)
aot_compilation_time = 0

with maybe_enable_compiled_autograd(
self.args.compiled_autograd,
Expand Down Expand Up @@ -3318,7 +3314,7 @@ def warmup(fn, model, example_inputs, mode, niters=10):
)
dynamo_cache_lookup_latency = events[0].self_cpu_time_total

compilation_time = dynamo_latency - eager_latency + aot_compilation_time
compilation_time = dynamo_latency - eager_latency
compression_ratio = (
eager_peak_mem / dynamo_peak_mem if dynamo_peak_mem else 0.0
)
Expand Down Expand Up @@ -3429,13 +3425,9 @@ def warmup(fn, model, example_inputs, mode, niters=5):
)

if self.args.export_aot_inductor:
t_0 = time.perf_counter()
optimized_model_iter_fn = optimize_ctx
t_1 = time.perf_counter()
aot_compilation_time = t_1 - t_0
else:
optimized_model_iter_fn = optimize_ctx(self.model_iter_fn)
aot_compilation_time = 0

with maybe_enable_compiled_autograd(
self.args.compiled_autograd,
Expand Down Expand Up @@ -3475,7 +3467,7 @@ def warmup(fn, model, example_inputs, mode, niters=5):
)
dynamo_cache_lookup_latency = events[0].self_cpu_time_total

compilation_time = dynamo_latency - eager_latency + aot_compilation_time
compilation_time = dynamo_latency - eager_latency
compression_ratio = (
eager_peak_mem / dynamo_peak_mem if dynamo_peak_mem else 0.0
)
Expand Down

0 comments on commit 2dd3e11

Please sign in to comment.