Skip to content

Commit

Permalink
Skip model_flop_per_sec report if it's not computed (#1469)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanYashchuk authored Nov 27, 2024
1 parent cd6977d commit aa7515a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion thunder/benchmarks/benchmark_litgpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,8 @@ def benchmark_main(return_metrics_as_json=False, json_path="", **kwargs) -> None
if tokens_per_sec:
print(f"Tokens/s: {tokens_per_sec:.02f}")
print(f"Tokens/s/GPU: {(tokens_per_sec / world_size):.02f}")
print(f"TFLOP/s: {benchmark.perf_metrics['model_flop_per_sec'] / 1e12:.02f}")
if benchmark.throughput:
print(f"TFLOP/s: {benchmark.perf_metrics['model_flop_per_sec'] / 1e12:.02f}")

if benchmark.dump_memory_snapshot:
file_name = f"{benchmark.model_name}_{benchmark.compile}_{benchmark.distributed_mode}"
Expand Down

0 comments on commit aa7515a

Please sign in to comment.