(executorch_program: ExportedProgram)
| 48 | |
| 49 | |
| 50 | def get_executorch_model(executorch_program: ExportedProgram): |
| 51 | try: |
| 52 | from executorch.extension.pybindings.portable_lib import ( # @manual |
| 53 | _load_for_executorch_from_buffer, |
| 54 | ) |
| 55 | |
| 56 | return _load_for_executorch_from_buffer(executorch_program.buffer) |
| 57 | except ImportError: |
| 58 | logging.info( |
| 59 | "ExecuTorch MPS delegate was built without pybind support (not possible to run forward pass within python)" |
| 60 | ) |
| 61 | return None |
| 62 | |
| 63 | |
| 64 | def bench_torch(executorch_program: ExportedProgram, model, inputs, model_name): |
no test coverage detected