Skip to content

Commit

Permalink
Update transformer_flops.py (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
stas00 authored Mar 7, 2024
1 parent 233f003 commit 99ecff6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion benchmarks/sizing/transformer_flops.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def benchmark_transformer(c_args,configuration, seq_length, global_batch_size, n
times[i] = start.elapsed_time(end)

times = times[num_warmup_iterations:]
elapsed_time = np.amax(times)/1000 # get to seconds from milliseconds
elapsed_time = np.amin(times)/1000 # get to seconds from milliseconds

throughput = num_floating_point_operations / (elapsed_time * 10**12)
print(f"{label} duration (in seconds): {elapsed_time:.4f}")
Expand Down

0 comments on commit 99ecff6

Please sign in to comment.