Skip to content

Commit

Permalink
Update time to ms on CPU (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
yanbing-j authored Jul 30, 2024
1 parent 3e9c47d commit de861af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions experiments/eval_combo.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def build_results_batch_nested(predictor, batch, batch_size, pad_input_image_bat
torch.cuda.synchronize()
elapsed_time = start_event.elapsed_time(end_event)
else:
elapsed_time = time.time() - t0
elapsed_time = (time.time() - t0) * 1000
return sum(result_batch, []), orig_input_image_batch_size, elapsed_time

def build_results_batch(predictor, batch, batch_size, pad_input_image_batch):
Expand Down Expand Up @@ -173,7 +173,7 @@ def build_results_batch(predictor, batch, batch_size, pad_input_image_batch):
torch.cuda.synchronize()
elapsed_time = start_event.elapsed_time(end_event)
else:
elapsed_time = time.time() - t0
elapsed_time = (time.time() - t0) * 1000
return result_batch, orig_input_image_batch_size, elapsed_time


Expand Down

0 comments on commit de861af

Please sign in to comment.