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

Function _get_exported_program

devtools/visualization/visualization_utils.py:102–109  ·  view source on GitHub ↗
(
    visualizable: ExportedProgram | EdgeProgramManager | ExecutorchProgramManager,
)

Source from the content-addressed store, hash-verified

100
101
102def _get_exported_program(
103 visualizable: ExportedProgram | EdgeProgramManager | ExecutorchProgramManager,
104) -> ExportedProgram:
105 if isinstance(visualizable, ExportedProgram):
106 return visualizable
107 if isinstance(visualizable, (EdgeProgramManager, ExecutorchProgramManager)):
108 return visualizable.exported_program()
109 raise RuntimeError(f"Cannot get ExportedProgram from {visualizable}")
110
111
112def visualize(

Callers 2

visualizeFunction · 0.85
visualize_graphFunction · 0.85

Calls 1

exported_programMethod · 0.45

Tested by

no test coverage detected