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

Function build_overlay_data

examples/arm/visualize.py:233–244  ·  view source on GitHub ↗

Build ModelExplorer node data from trace and tables files.

(trace_path: Path, tables_path: Path)

Source from the content-addressed store, hash-verified

231
232
233def build_overlay_data(trace_path: Path, tables_path: Path) -> ndb.ModelNodeData:
234 """
235 Build ModelExplorer node data from trace and tables files.
236 """
237 tables = parse_tables(tables_path)
238 events = get_trace_file_objects(trace_path)
239 transform_events(events, tables.queue, get_subops(tables.group))
240 perf_df, cmd_to_op_df = build_perf_df(tables)
241 src_df = build_src_df(tables, perf_df)
242 check_unmapped_ops(tables, src_df, cmd_to_op_df)
243
244 return get_model_node_data(src_df)
245
246
247def validate_file_exists(file_path: Path) -> None:

Callers 1

mainFunction · 0.85

Calls 8

parse_tablesFunction · 0.85
get_trace_file_objectsFunction · 0.85
transform_eventsFunction · 0.85
get_subopsFunction · 0.85
build_perf_dfFunction · 0.85
build_src_dfFunction · 0.85
check_unmapped_opsFunction · 0.85
get_model_node_dataFunction · 0.85

Tested by

no test coverage detected