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

Function get_bundled_program

examples/apple/mps/scripts/mps_example.py:41–58  ·  view source on GitHub ↗
(executorch_program, example_inputs, expected_output)

Source from the content-addressed store, hash-verified

39
40
41def get_bundled_program(executorch_program, example_inputs, expected_output):
42 method_test_suites = [
43 MethodTestSuite(
44 method_name="forward",
45 test_cases=[
46 MethodTestCase(
47 inputs=example_inputs, expected_outputs=[expected_output]
48 )
49 ],
50 )
51 ]
52 logging.info(f"Expected output: {expected_output}")
53
54 bundled_program = BundledProgram(executorch_program, method_test_suites)
55 bundled_program_buffer = serialize_from_bundled_program_to_flatbuffer(
56 bundled_program
57 )
58 return bundled_program_buffer
59
60
61def parse_args():

Callers 1

mps_example.pyFile · 0.85

Calls 5

MethodTestSuiteClass · 0.90
MethodTestCaseClass · 0.90
BundledProgramClass · 0.90
infoMethod · 0.80

Tested by

no test coverage detected