Skip to content

Commit

Permalink
Remove gc.collect() upon every model compute run. (pytorch#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
xuzhao9 authored Apr 14, 2022
1 parent a460bde commit 4fd850c
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion torchbench.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ def load_model(device, model_name, is_training, use_eval_mode):

def timed(model, model_iter_fn, example_inputs, times=1, return_result=False):
synchronize()
gc.collect()
torch.manual_seed(1337)
t0 = time.perf_counter()
# Dont collect outputs to correctly measure timing
Expand Down

0 comments on commit 4fd850c

Please sign in to comment.