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

Function _save_bundled_program

backends/arm/scripts/aot_arm_compiler.py:75–83  ·  view source on GitHub ↗

Serialize a bundled program to disk.

(executorch_program, method_test_suites, output_path: str)

Source from the content-addressed store, hash-verified

73
74
75def _save_bundled_program(executorch_program, method_test_suites, output_path: str):
76 """Serialize a bundled program to disk."""
77 bundled_program = BundledProgram(executorch_program, method_test_suites)
78 bundled_program_buffer = serialize_from_bundled_program_to_flatbuffer(
79 bundled_program
80 )
81
82 with open(output_path, "wb") as file:
83 file.write(bundled_program_buffer)
84
85
86def _load_example_inputs(model_input: str | None) -> Any: # nosec B614

Callers 1

_save_bpte_programFunction · 0.85

Calls 3

BundledProgramClass · 0.90
writeMethod · 0.80

Tested by

no test coverage detected