Skip to content

Commit

Permalink
[Debugger] Sorting op-time breakdown for quicker analysis.
Browse files Browse the repository at this point in the history
  • Loading branch information
anijain2305 committed Nov 16, 2019
1 parent 5d66e7a commit accb4d3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/tvm/contrib/debugger/debug_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,11 @@ def display_debug_result(self):
node_data = [name, op, time_us, time_percent, shape, inputs, outputs]
data.append(node_data)
eid += 1

# Sort on the basis of execution time. Prints the most expensive ops in the start.
data = sorted(data, key=lambda x: x[2], reverse=True)
# Insert a row for total time at the end.
data.append(["Total_time", "-", round(total_time * 1000000, 3), "-", "-", "-", "-", "-"])
fmt = ""
for i, _ in enumerate(header):
max_len = len(header[i])
Expand Down

0 comments on commit accb4d3

Please sign in to comment.