Skip to content

Commit d619f19

Browse files
committed
Completing the info text of the hotspot analysis script
1 parent 968ce0f commit d619f19

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

examples/hotspot/analyze_benchmark.py

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,17 @@
44
55
First, run the benchmark.sh and verify_benchmark.sh scripts and pipe their output into `benchmark.py`
66
and `verify_benchmark.py` respectively. If you submit the scripts as slurm jobs, this is done
7-
automatically.
8-
9-
The output is formatted like a Python dict, but you need to remove error and output messages. Then,
10-
execute this script. It loads the outputs automatically.
7+
automatically. The output is formatted like a Python dict, but you need to remove error and output
8+
messages. Lastly, you need to copy the cycle frequency and the pipeline length from the reports into this script.
119
"""
1210
from matplotlib import pyplot
1311
import numpy as np
1412

1513
from benchmark import runtime
1614
from verify_benchmark import value_derivation
1715

18-
cycle_frequency = {
19-
225: 79.63 * 10**6,
20-
}
21-
pipeline_length = {
22-
225: 225,
23-
}
16+
cycle_frequency = 79.63 * 10**6
17+
pipeline_length = 225
2418

2519
height = width = 1024
2620
radius = 1
@@ -42,8 +36,8 @@
4236
overhead = runtime[i][0] - mean_delta
4337
print("\tOverhead: {:.2f} seconds".format(overhead))
4438

45-
executed_flop = pipeline_length[i] * flo_per_cell * height * width
46-
executed_cycles = mean_delta * cycle_frequency[i]
39+
executed_flop = pipeline_length * flo_per_cell * height * width
40+
executed_cycles = mean_delta * cycle_frequency
4741

4842
gflops = executed_flop / mean_delta * 10**-9
4943
ii = executed_cycles / (width * height)

0 commit comments

Comments
 (0)