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

Function mem_profile_table

profiler/parse_profiler_results.py:359–370  ·  view source on GitHub ↗
(mem_allocations: Dict[str, List[MemEvent]])

Source from the content-addressed store, hash-verified

357
358
359def mem_profile_table(mem_allocations: Dict[str, List[MemEvent]]) -> List[PrettyTable]:
360 tables = []
361 for name, prof_data_list in mem_allocations.items():
362 table = PrettyTable()
363 table.title = name
364 table_rows = []
365 for mem_event in prof_data_list:
366 table_rows += [(mem_event.allocator_name, mem_event.total_allocations_done)]
367 table.add_rows(table_rows)
368 table.field_names = ["Allocator name"] + ["Total size of allocations done"]
369 tables.append(table)
370 return tables
371
372
373def profile_aggregate_framework_tax(

Callers 2

mainFunction · 0.90

Calls 2

itemsMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected