tt-perf-report 1.1.6__py3-none-any.whl → 1.1.8__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.
- tt_perf_report/perf_report.py +19 -6
- {tt_perf_report-1.1.6.dist-info → tt_perf_report-1.1.8.dist-info}/METADATA +1 -1
- tt_perf_report-1.1.8.dist-info/RECORD +9 -0
- tt_perf_report-1.1.6.dist-info/RECORD +0 -9
- {tt_perf_report-1.1.6.dist-info → tt_perf_report-1.1.8.dist-info}/WHEEL +0 -0
- {tt_perf_report-1.1.6.dist-info → tt_perf_report-1.1.8.dist-info}/entry_points.txt +0 -0
- {tt_perf_report-1.1.6.dist-info → tt_perf_report-1.1.8.dist-info}/licenses/LICENSE +0 -0
- {tt_perf_report-1.1.6.dist-info → tt_perf_report-1.1.8.dist-info}/licenses/LICENSE_understanding.txt +0 -0
- {tt_perf_report-1.1.6.dist-info → tt_perf_report-1.1.8.dist-info}/top_level.txt +0 -0
tt_perf_report/perf_report.py
CHANGED
|
@@ -500,7 +500,7 @@ def analyze_op(row, prev_row, csv_format="v2"):
|
|
|
500
500
|
if math_fidelity
|
|
501
501
|
else None
|
|
502
502
|
)
|
|
503
|
-
elif
|
|
503
|
+
elif any(x in op_code.raw_value for x in ["OptimizedConvNew", "Conv2d"]):
|
|
504
504
|
(
|
|
505
505
|
flops,
|
|
506
506
|
flops_percentage,
|
|
@@ -622,6 +622,7 @@ def color_row(op_data, percentage, min_percentage):
|
|
|
622
622
|
"(torch)": "red",
|
|
623
623
|
"Matmul": "magenta",
|
|
624
624
|
"OptimizedConvNew" : "orange",
|
|
625
|
+
"Conv2d" : "orange",
|
|
625
626
|
"LayerNorm": "cyan",
|
|
626
627
|
"AllGather": "cyan",
|
|
627
628
|
"AllReduce": "cyan",
|
|
@@ -695,7 +696,7 @@ def color_row(op_data, percentage, min_percentage):
|
|
|
695
696
|
return op_data
|
|
696
697
|
|
|
697
698
|
|
|
698
|
-
def print_performance_table(rows, headers, col_widths, device_ops, host_ops):
|
|
699
|
+
def print_performance_table(rows, headers, col_widths, device_ops, host_ops, signpost_count):
|
|
699
700
|
print("\n🚀 Performance Report 🚀\n========================\n")
|
|
700
701
|
|
|
701
702
|
print(" ".join(pad_string(header, col_widths[i], align="left") for i, header in enumerate(headers)))
|
|
@@ -716,7 +717,7 @@ def print_performance_table(rows, headers, col_widths, device_ops, host_ops):
|
|
|
716
717
|
"ID": Cell(""),
|
|
717
718
|
"Total %": Cell(100.0, unit="%", decimals=1),
|
|
718
719
|
"Bound": Cell(""),
|
|
719
|
-
"OP Code": Cell(f"{device_ops} device ops, {host_ops} host ops"),
|
|
720
|
+
"OP Code": Cell(f"{device_ops} device ops, {host_ops} host ops, {signpost_count} signposts"),
|
|
720
721
|
"Device Time": Cell(total_device_time, unit="us", decimals=0),
|
|
721
722
|
"Op-to-Op Gap": Cell(total_visible_gap, unit="us", decimals=0),
|
|
722
723
|
}
|
|
@@ -867,7 +868,7 @@ def generate_matmul_advice(op_data):
|
|
|
867
868
|
|
|
868
869
|
def generate_stacked_report(rows, visible_headers, stack_by_input0_layout:bool = False):
|
|
869
870
|
# Ensure we filter out signpost rows before processing because they aren't useful in the stacked report
|
|
870
|
-
filtered_rows =
|
|
871
|
+
filtered_rows = filter_signposts(rows)
|
|
871
872
|
|
|
872
873
|
if stack_by_input0_layout:
|
|
873
874
|
visible_headers.append("Input 0 Memory")
|
|
@@ -1056,6 +1057,8 @@ def filter_by_id_range(rows, id_range):
|
|
|
1056
1057
|
def filter_host_ops(rows):
|
|
1057
1058
|
return [row for row in rows if not is_host_op(row)]
|
|
1058
1059
|
|
|
1060
|
+
def filter_signposts(rows):
|
|
1061
|
+
return [row for row in rows if not is_signpost_op(row)]
|
|
1059
1062
|
|
|
1060
1063
|
def main():
|
|
1061
1064
|
args, id_range = parse_args()
|
|
@@ -1139,18 +1142,26 @@ def generate_perf_report(csv_file, signpost, ignore_signposts, min_percentage,
|
|
|
1139
1142
|
prev_row = None
|
|
1140
1143
|
device_ops = 0
|
|
1141
1144
|
host_ops = 0
|
|
1145
|
+
signpost_count = 0
|
|
1142
1146
|
for _, row in df.iterrows():
|
|
1143
1147
|
op_data, current_gap = analyze_op(row, prev_row, csv_format)
|
|
1144
1148
|
op_data["ID"] = Cell(row["ORIGINAL_ROW"]) # Use the original row number
|
|
1145
1149
|
op_data["Global Call Count"] = Cell(row["GLOBAL CALL COUNT"])
|
|
1146
1150
|
if raw_op_codes:
|
|
1147
1151
|
op_data["Raw OP Code"] = Cell(row["OP CODE"])
|
|
1152
|
+
|
|
1153
|
+
# OP TYPE column is only present in raw format/df and is not part of the op_data/rows dictionary used later
|
|
1154
|
+
# append " (signpost)" to the OP Code if this row is a signpost to distinguish it
|
|
1155
|
+
if "signpost" in row["OP TYPE"]:
|
|
1156
|
+
op_data["OP Code"].raw_value = f"{row['OP CODE']} (signpost)"
|
|
1148
1157
|
rows.append(op_data)
|
|
1149
1158
|
prev_row = row
|
|
1150
1159
|
|
|
1151
|
-
# Count device and host ops
|
|
1160
|
+
# Count device and host ops, ignore signposts
|
|
1152
1161
|
if is_host_op(op_data):
|
|
1153
1162
|
host_ops += 1
|
|
1163
|
+
elif is_signpost_op(op_data):
|
|
1164
|
+
signpost_count += 1
|
|
1154
1165
|
else:
|
|
1155
1166
|
device_ops += 1
|
|
1156
1167
|
|
|
@@ -1218,7 +1229,7 @@ def generate_perf_report(csv_file, signpost, ignore_signposts, min_percentage,
|
|
|
1218
1229
|
max(max(visible_length(str(row[header])) for row in rows), visible_length(header))
|
|
1219
1230
|
for header in visible_headers
|
|
1220
1231
|
]
|
|
1221
|
-
print_performance_table(rows, visible_headers, col_widths, device_ops, host_ops)
|
|
1232
|
+
print_performance_table(rows, visible_headers, col_widths, device_ops, host_ops, signpost_count)
|
|
1222
1233
|
if not no_advice:
|
|
1223
1234
|
print_advice_section(rows, visible_headers, col_widths)
|
|
1224
1235
|
|
|
@@ -1242,6 +1253,8 @@ def generate_perf_report(csv_file, signpost, ignore_signposts, min_percentage,
|
|
|
1242
1253
|
def is_host_op(op_data):
|
|
1243
1254
|
return "(torch)" in op_data["OP Code"].raw_value
|
|
1244
1255
|
|
|
1256
|
+
def is_signpost_op(op_data):
|
|
1257
|
+
return "signpost" in op_data["OP Code"].raw_value
|
|
1245
1258
|
|
|
1246
1259
|
if __name__ == "__main__":
|
|
1247
1260
|
main()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tt-perf-report
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.8
|
|
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=g2gzB02UpeHkf_ZEinD54x1Z6MCrAN7V5pUvNBvD_T0,50758
|
|
3
|
+
tt_perf_report-1.1.8.dist-info/licenses/LICENSE,sha256=6dZGjPECz_ULS-sf40FLlt6OmQFcrRvmzG5mJRZCQ5I,11825
|
|
4
|
+
tt_perf_report-1.1.8.dist-info/licenses/LICENSE_understanding.txt,sha256=pymi-yb_RvYM9p2ZA4iSNsImcvhDBBxlGuJCY9dTq7M,233
|
|
5
|
+
tt_perf_report-1.1.8.dist-info/METADATA,sha256=TWkwmid9BVsn3cTzAXOH1muqYyvnR9Af-6DZqYASntc,18393
|
|
6
|
+
tt_perf_report-1.1.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
7
|
+
tt_perf_report-1.1.8.dist-info/entry_points.txt,sha256=ReAziglcjbAkPbklqheUISkfoEVI5ptlFrBAJTIk5dI,67
|
|
8
|
+
tt_perf_report-1.1.8.dist-info/top_level.txt,sha256=mEQ-BK3rRbmz9QyWitTCLy2xwmC5rmJno_TY_H9s9CE,15
|
|
9
|
+
tt_perf_report-1.1.8.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=fFYkqBhzLxVd0GP6_0t5AT6eu0TTkR_mXRpDEzBFdAM,50073
|
|
3
|
-
tt_perf_report-1.1.6.dist-info/licenses/LICENSE,sha256=6dZGjPECz_ULS-sf40FLlt6OmQFcrRvmzG5mJRZCQ5I,11825
|
|
4
|
-
tt_perf_report-1.1.6.dist-info/licenses/LICENSE_understanding.txt,sha256=pymi-yb_RvYM9p2ZA4iSNsImcvhDBBxlGuJCY9dTq7M,233
|
|
5
|
-
tt_perf_report-1.1.6.dist-info/METADATA,sha256=v0WjaVimTCYDNPY2VdCyySbb2h05nt-0EG-ZEAfKLeg,18393
|
|
6
|
-
tt_perf_report-1.1.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
7
|
-
tt_perf_report-1.1.6.dist-info/entry_points.txt,sha256=ReAziglcjbAkPbklqheUISkfoEVI5ptlFrBAJTIk5dI,67
|
|
8
|
-
tt_perf_report-1.1.6.dist-info/top_level.txt,sha256=mEQ-BK3rRbmz9QyWitTCLy2xwmC5rmJno_TY_H9s9CE,15
|
|
9
|
-
tt_perf_report-1.1.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tt_perf_report-1.1.6.dist-info → tt_perf_report-1.1.8.dist-info}/licenses/LICENSE_understanding.txt
RENAMED
|
File without changes
|
|
File without changes
|