File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change 13
13
14
14
import torch # noqa: F401
15
15
import torch .nn as nn
16
+ from executorch .exir import to_edge
16
17
from executorch .exir .lowered_backend_module import LoweredBackendModule
17
18
from torch import Tensor
19
+ from torch .export import export
18
20
19
21
# TODO: add one more test for data dependent op plus repeat
20
22
@@ -148,13 +150,14 @@ def get_random_inputs(self) -> Tuple[Tensor, Tensor]:
148
150
return (torch .randn (1 , 3 ), torch .randn (1 , 3 ))
149
151
150
152
delegated_m = DelegateAdd ()
151
- edge_ir_m = exir .capture (
152
- delegated_m ,
153
- delegated_m .get_random_inputs (),
154
- exir .CaptureConfig (),
155
- ).to_edge ()
153
+ edge_ir_m = to_edge (
154
+ export (
155
+ delegated_m ,
156
+ delegated_m .get_random_inputs (),
157
+ )
158
+ )
156
159
lowered_module = LoweredBackendModule (
157
- edge_program = edge_ir_m .exported_program ,
160
+ edge_program = edge_ir_m .exported_program () ,
158
161
backend_id = "backend_demo" ,
159
162
processed_bytes = bytes ("basic_module_add" , encoding = "utf8" ),
160
163
compile_specs = [],
You can’t perform that action at this time.
0 commit comments