(
module: torch.nn.Module,
example_inputs: Tuple[Value, ...],
edge_compile_config: exir.EdgeCompileConfig = _EDGE_COMPILE_CONFIG,
)
| 103 | |
| 104 | |
| 105 | def module_to_edge( |
| 106 | module: torch.nn.Module, |
| 107 | example_inputs: Tuple[Value, ...], |
| 108 | edge_compile_config: exir.EdgeCompileConfig = _EDGE_COMPILE_CONFIG, |
| 109 | ) -> EdgeProgramManager: |
| 110 | module.eval() |
| 111 | core_aten_program = to_core_aten( |
| 112 | module=module, |
| 113 | example_inputs=example_inputs, |
| 114 | ) |
| 115 | return core_aten_to_edge( |
| 116 | core_aten_program=core_aten_program, |
| 117 | edge_compile_config=edge_compile_config, |
| 118 | ) |
| 119 | |
| 120 | |
| 121 | def lower_and_export_edge_to_coreml( |
no test coverage detected