MCPcopy Create free account
hub / github.com/pytorch/executorch / main

Function main

profiler/profiler_results_cli.py:19–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17
18
19def main() -> int:
20 parser = argparse.ArgumentParser()
21 parser.add_argument("--prof_results_bin", help="profiling results binary file")
22 args = parser.parse_args()
23
24 with open(args.prof_results_bin, "rb") as prof_results_file:
25 out_bytes = prof_results_file.read()
26
27 prof_data, mem_allocations = deserialize_profile_results(out_bytes)
28 framework_tax_data = profile_aggregate_framework_tax(prof_data)
29
30 prof_tables = profile_table(prof_data)
31 for table in prof_tables:
32 print(table)
33
34 prof_tables_agg = profile_framework_tax_table(framework_tax_data)
35 for table in prof_tables_agg:
36 print(table)
37
38 mem_prof_tables = mem_profile_table(mem_allocations)
39 for table in mem_prof_tables:
40 print(table)
41 return 0
42
43
44def invoke_main() -> None:

Callers 1

invoke_mainFunction · 0.70

Calls 5

profile_tableFunction · 0.90
mem_profile_tableFunction · 0.90

Tested by

no test coverage detected