File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
exir/backend/test/demos/rpc Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change 6
6
7
7
from typing import final , List
8
8
9
- import executorch .exir as exir
9
+ from executorch .exir import ExirExportedProgram
10
10
from executorch .exir .backend .backend_details import BackendDetails , ExportedProgram
11
11
from executorch .exir .backend .compile_spec_schema import CompileSpec
12
12
@@ -18,9 +18,12 @@ def preprocess(
18
18
edge_program : ExportedProgram ,
19
19
compile_specs : List [CompileSpec ],
20
20
) -> bytes :
21
- new_prog = edge_program .transform (
22
- * exir .edge_to_executorch_passes (exir .ExecutorchBackendConfig ())
21
+ return (
22
+ ExirExportedProgram (
23
+ exported_program = edge_program ,
24
+ # Indicates that edge_program is already in edge dialect.
25
+ after_to_edge_passes = True ,
26
+ )
27
+ .to_executorch ()
28
+ .buffer
23
29
)
24
- program = exir .emit_program (new_prog ).program
25
- buffer = exir .serialize_to_flatbuffer (program )
26
- return buffer
You can’t perform that action at this time.
0 commit comments