|
20 | 20 | from executorch.backends.vulkan.partitioner.vulkan_partitioner import VulkanPartitioner
|
21 | 21 | from executorch.backends.vulkan.vulkan_preprocess import VulkanBackend
|
22 | 22 |
|
23 |
| -from executorch.exir import EdgeCompileConfig, EdgeProgramManager, to_edge |
| 23 | +from executorch.exir import EdgeCompileConfig |
24 | 24 | from torch.export import Dim, export, ExportedProgram
|
25 | 25 |
|
26 | 26 | ctypes.CDLL("libvulkan.so.1")
|
27 | 27 |
|
28 | 28 |
|
| 29 | +from executorch.exir.program._program import _to_edge_transform_and_lower |
29 | 30 | from executorch.extension.pybindings.portable_lib import ( # @manual
|
30 | 31 | _load_for_executorch_from_buffer,
|
31 | 32 | )
|
@@ -119,16 +120,15 @@ def run_test(memory_layout):
|
119 | 120 | program: ExportedProgram = export(
|
120 | 121 | model, sample_inputs, dynamic_shapes=dynamic_shapes
|
121 | 122 | )
|
122 |
| - edge_program: EdgeProgramManager = to_edge( |
123 |
| - program, compile_config=self._edge_compile_config |
124 |
| - ) |
125 | 123 |
|
126 |
| - edge_program = edge_program.transform( |
127 |
| - [I64toI32(self._edge_compile_config._skip_dim_order), MeanToSumDiv()] |
| 124 | + edge_program = _to_edge_transform_and_lower( |
| 125 | + program, |
| 126 | + transform_passes=[ |
| 127 | + I64toI32(self._edge_compile_config._skip_dim_order), |
| 128 | + MeanToSumDiv(), |
| 129 | + ], |
| 130 | + partitioner=[VulkanPartitioner(compile_options)], |
128 | 131 | )
|
129 |
| - |
130 |
| - edge_program = edge_program.to_backend(VulkanPartitioner(compile_options)) |
131 |
| - |
132 | 132 | executorch_program = edge_program.to_executorch()
|
133 | 133 |
|
134 | 134 | self.assertEqual(
|
|
0 commit comments