tt-perf-report 1.0.5__tar.gz → 1.0.6__tar.gz

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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: tt-perf-report
3
- Version: 1.0.5
3
+ Version: 1.0.6
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
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "tt-perf-report"
7
- version = "1.0.5"
7
+ version = "1.0.6"
8
8
  description = "This tool analyzes performance traces from TT-Metal operations, providing insights into throughput, bottlenecks, and optimization opportunities."
9
9
  license = {file = "LICENSE"}
10
10
  readme = "README.md"
@@ -814,11 +814,15 @@ def filter_by_id_range(rows, id_range):
814
814
  return rows
815
815
 
816
816
 
817
+ def filter_host_ops(rows):
818
+ return [row for row in rows if not is_host_op(row)]
819
+
820
+
817
821
  def main():
818
822
  args, id_range = parse_args()
819
823
  generate_perf_report(
820
- args.csv_file, args.signpost, args.ignore_signposts, args.min_percentage, id_range, args.csv, args.no_advice, args.tracing_mode, args.raw_op_codes,
821
- )
824
+ args.csv_file, args.signpost, args.ignore_signposts, args.min_percentage, id_range, args.csv, args.no_advice,
825
+ args.tracing_mode, args.raw_op_codes, args.no_host_ops)
822
826
 
823
827
 
824
828
  def parse_args():
@@ -840,6 +844,8 @@ def parse_args():
840
844
  parser.add_argument("--no-advice", action="store_true", help="Only show the table section of the report")
841
845
  parser.add_argument("--tracing-mode", action="store_true", help="Do not sort when in tracing mode")
842
846
  parser.add_argument("--raw-op-codes", action="store_true", help="Include raw op codes in output")
847
+ parser.add_argument("--no-host-ops", action="store_true", help="Do not include host ops in output")
848
+
843
849
  args = parser.parse_args()
844
850
 
845
851
  # Set the global color_output variable
@@ -855,7 +861,9 @@ def parse_args():
855
861
  return args, id_range
856
862
 
857
863
 
858
- def generate_perf_report(csv_file, signpost, ignore_signposts, min_percentage, id_range, csv_output_file, no_advice, tracing_mode, raw_op_codes):
864
+ def generate_perf_report(csv_file, signpost, ignore_signposts, min_percentage,
865
+ id_range, csv_output_file, no_advice, tracing_mode,
866
+ raw_op_codes, no_host_ops):
859
867
  df = pd.read_csv(csv_file, low_memory=False)
860
868
 
861
869
  # Add a column for original row numbers
@@ -889,7 +897,7 @@ def generate_perf_report(csv_file, signpost, ignore_signposts, min_percentage, i
889
897
  prev_row = row
890
898
 
891
899
  # Count device and host ops
892
- if "(torch)" in op_data["OP Code"].raw_value:
900
+ if is_host_op(op_data):
893
901
  host_ops += 1
894
902
  else:
895
903
  device_ops += 1
@@ -900,6 +908,9 @@ def generate_perf_report(csv_file, signpost, ignore_signposts, min_percentage, i
900
908
  # Filter rows based on id_range
901
909
  rows = filter_by_id_range(rows, id_range)
902
910
 
911
+ if no_host_ops:
912
+ rows = filter_host_ops(rows)
913
+
903
914
  # Recalculate derived columns after filtering
904
915
  add_derived_columns(rows)
905
916
 
@@ -955,5 +966,9 @@ def generate_perf_report(csv_file, signpost, ignore_signposts, min_percentage, i
955
966
  print_advice_section(rows, visible_headers, col_widths)
956
967
 
957
968
 
969
+ def is_host_op(op_data):
970
+ return "(torch)" in op_data["OP Code"].raw_value
971
+
972
+
958
973
  if __name__ == "__main__":
959
974
  main()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: tt-perf-report
3
- Version: 1.0.5
3
+ Version: 1.0.6
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
File without changes
File without changes
File without changes