tt-perf-report 1.1.2__py3-none-any.whl → 1.1.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of tt-perf-report might be problematic. Click here for more details.

@@ -4,10 +4,10 @@
4
4
  # SPDX-FileCopyrightText: © 2025 Tenstorrent AI ULC
5
5
  import argparse
6
6
  import csv
7
- from collections import defaultdict
8
7
  import os
9
8
  import re
10
9
  import sys
10
+ from collections import defaultdict
11
11
  from typing import Any, Optional, Union
12
12
 
13
13
  import matplotlib.pyplot as plt
@@ -581,7 +581,10 @@ def add_derived_columns(rows):
581
581
  for op_data in rows:
582
582
  device_time = op_data["Device Time"].raw_value if op_data["Device Time"].raw_value is not None else 0
583
583
  op_to_op_gap = op_data["Op-to-Op Gap"].raw_value if op_data["Op-to-Op Gap"].raw_value is not None else 0
584
- op_data["Total %"] = Cell(((device_time + op_to_op_gap) / total_duration) * 100, unit="%", decimals=1)
584
+ if total_duration != 0:
585
+ op_data["Total %"] = Cell(((device_time + op_to_op_gap) / total_duration) * 100, unit="%", decimals=1)
586
+ else:
587
+ op_data["Total %"] = Cell(None, unit="%", decimals=1)
585
588
  if op_data["Device Time"].raw_value is None and op_data["Op-to-Op Gap"].raw_value is None:
586
589
  op_data["Total %"].raw_value = None
587
590
 
@@ -1199,6 +1202,10 @@ def generate_perf_report(csv_file, signpost, ignore_signposts, min_percentage,
1199
1202
  row["Advice"] = " • ".join(advice)
1200
1203
  csv_writer.writerow(row)
1201
1204
  else:
1205
+ if not rows:
1206
+ print(colored("No operations to display after applying filters.", "yellow"))
1207
+ return
1208
+
1202
1209
  col_widths = [
1203
1210
  max(max(visible_length(str(row[header])) for row in rows), visible_length(header))
1204
1211
  for header in visible_headers
@@ -1208,7 +1215,7 @@ def generate_perf_report(csv_file, signpost, ignore_signposts, min_percentage,
1208
1215
  print_advice_section(rows, visible_headers, col_widths)
1209
1216
 
1210
1217
  # handle stacked report generation
1211
- if not(no_stacked_report):
1218
+ if not(no_stacked_report) and rows:
1212
1219
  stacked_report = generate_stacked_report(rows, visible_headers, not(no_stack_by_in0))
1213
1220
 
1214
1221
  if not(csv_output_file):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tt-perf-report
3
- Version: 1.1.2
3
+ Version: 1.1.4
4
4
  Summary: This tool analyzes performance traces from TT-Metal operations, providing insights into throughput, bottlenecks, and optimization opportunities.
5
5
  License: Apache License
6
6
  Version 2.0, January 2004
@@ -0,0 +1,9 @@
1
+ tt_perf_report/__init__.py,sha256=-j4iFYebIwgdS8uphk8-M6zasRqGBL3CQGnJH9keRuI,92
2
+ tt_perf_report/perf_report.py,sha256=sVjqtFQhOdFpKYZ8_agxAgJqGNhostDjefW-RnFti1o,49785
3
+ tt_perf_report-1.1.4.dist-info/licenses/LICENSE,sha256=6dZGjPECz_ULS-sf40FLlt6OmQFcrRvmzG5mJRZCQ5I,11825
4
+ tt_perf_report-1.1.4.dist-info/licenses/LICENSE_understanding.txt,sha256=pymi-yb_RvYM9p2ZA4iSNsImcvhDBBxlGuJCY9dTq7M,233
5
+ tt_perf_report-1.1.4.dist-info/METADATA,sha256=hcWagyFYDkL4wfrdo9n_31XfkRF1AsCX_gPgY7qJ1ms,18393
6
+ tt_perf_report-1.1.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
+ tt_perf_report-1.1.4.dist-info/entry_points.txt,sha256=ReAziglcjbAkPbklqheUISkfoEVI5ptlFrBAJTIk5dI,67
8
+ tt_perf_report-1.1.4.dist-info/top_level.txt,sha256=mEQ-BK3rRbmz9QyWitTCLy2xwmC5rmJno_TY_H9s9CE,15
9
+ tt_perf_report-1.1.4.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- tt_perf_report/__init__.py,sha256=-j4iFYebIwgdS8uphk8-M6zasRqGBL3CQGnJH9keRuI,92
2
- tt_perf_report/perf_report.py,sha256=jR4qQXbp_EmMPzVLFPCMNdAkQIID86cQWDFi9aaJ7N0,49530
3
- tt_perf_report-1.1.2.dist-info/licenses/LICENSE,sha256=6dZGjPECz_ULS-sf40FLlt6OmQFcrRvmzG5mJRZCQ5I,11825
4
- tt_perf_report-1.1.2.dist-info/licenses/LICENSE_understanding.txt,sha256=pymi-yb_RvYM9p2ZA4iSNsImcvhDBBxlGuJCY9dTq7M,233
5
- tt_perf_report-1.1.2.dist-info/METADATA,sha256=YDhjas8bQEK4in2sWiDMA0K0heB70TxhMwqqKTeHbOk,18393
6
- tt_perf_report-1.1.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
- tt_perf_report-1.1.2.dist-info/entry_points.txt,sha256=ReAziglcjbAkPbklqheUISkfoEVI5ptlFrBAJTIk5dI,67
8
- tt_perf_report-1.1.2.dist-info/top_level.txt,sha256=mEQ-BK3rRbmz9QyWitTCLy2xwmC5rmJno_TY_H9s9CE,15
9
- tt_perf_report-1.1.2.dist-info/RECORD,,