Skip to content

Commit

Permalink
#0: Add new metric to the llama benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
mtairum committed Jan 29, 2025
1 parent 7d307fa commit 596b10c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions models/demos/llama3/demo/simple_text_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,20 @@ def test_llama_demo_text(
target=None,
)

# Also save the avg decode performance for the 128 iterations (excluding the compile time)
inference_decode_time_first_128 = sum(
profiler.get_duration(f"inference_decode_time_{i}") for i in range(1, 128)
)
benchmark_data.add_measurement(
profiler,
0,
"inference_decode",
"avg_decode_time_first_128",
inference_decode_time_first_128 * 1000 / 127,
step_warm_up_num_iterations=None,
target=None,
)

benchmark_data.save_partial_run_json(
profiler,
run_type=f"{tt_device_name}-demo",
Expand Down

0 comments on commit 596b10c

Please sign in to comment.