File tree Expand file tree Collapse file tree 4 files changed +8
-5
lines changed Expand file tree Collapse file tree 4 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 14
14
15
15
from executorch .backends .cadence .aot .compiler import (
16
16
convert_pt2 ,
17
- export_to_cadence ,
17
+ export_to_cadence_edge_executorch ,
18
18
fuse_pt2 ,
19
19
)
20
20
from executorch .backends .cadence .aot .quantizer .quantizer import CadenceQuantizer
@@ -53,10 +53,9 @@ def export_model(
53
53
quantized_model = fuse_pt2 (converted_model , quantizer )
54
54
55
55
# Get edge program after Cadence specific passes
56
- cadence_prog_manager = export_to_cadence (quantized_model , example_inputs )
57
-
58
- # Get executorch program after Cadence specific passes
59
- exec_prog : ExecutorchProgramManager = cadence_prog_manager .to_executorch ()
56
+ exec_prog : ExecutorchProgramManager = export_to_cadence_edge_executorch (
57
+ quantized_model , example_inputs , working_dir
58
+ )
60
59
61
60
logging .info ("Final exported graph:\n " )
62
61
exec_prog .exported_program ().graph_module .graph .print_tabular ()
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ main() {
25
25
-DCMAKE_BUILD_TYPE=Release \
26
26
-DEXECUTORCH_BUILD_DEVTOOLS=ON \
27
27
-DEXECUTORCH_ENABLE_EVENT_TRACER=ON \
28
+ -DEXECUTORCH_ENABLE_LOGGING=ON \
28
29
-Bcmake-out .
29
30
cmake --build cmake-out --target install --config Release -j16
30
31
@@ -35,6 +36,7 @@ main() {
35
36
cmake -DCMAKE_PREFIX_PATH=" ${cmake_prefix_path} " \
36
37
-DCMAKE_BUILD_TYPE=Release \
37
38
-DEXECUTORCH_CADENCE_CPU_RUNNER=ON \
39
+ -DEXECUTORCH_ENABLE_LOGGING=ON \
38
40
-B" ${build_dir} " \
39
41
" ${example_dir} "
40
42
cmake --build " ${build_dir} " --config Release -j16
Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ set(_aten_ops__srcs
52
52
"${EXECUTORCH_ROOT} /kernels/portable/cpu/op_expand_copy.cpp"
53
53
"${EXECUTORCH_ROOT} /kernels/portable/cpu/op_gelu.cpp"
54
54
"${EXECUTORCH_ROOT} /kernels/portable/cpu/op_empty.cpp"
55
+ "${EXECUTORCH_ROOT} /kernels/portable/cpu/util/dtype_util.cpp"
55
56
)
56
57
add_library (aten_ops_cadence ${_aten_ops__srcs} )
57
58
target_link_libraries (aten_ops_cadence PUBLIC executorch )
Original file line number Diff line number Diff line change @@ -123,6 +123,7 @@ def __call__(self) -> None:
123
123
),
124
124
"etdump_path" : os .path .join (self .working_dir , "etdump.etdp" ),
125
125
"debug_output_path" : os .path .join (self .working_dir , "debug_output.bin" ),
126
+ "dump_outputs" : "true" ,
126
127
}
127
128
args = self .get_bash_command (self .execute_runner , cmd_args )
128
129
logging .info (f"\33 [33m{ ' ' .join (args )} \33 [0m" )
You can’t perform that action at this time.
0 commit comments