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 1414
1515from executorch .backends .cadence .aot .compiler import (
1616 convert_pt2 ,
17- export_to_cadence ,
17+ export_to_cadence_edge_executorch ,
1818 fuse_pt2 ,
1919)
2020from executorch .backends .cadence .aot .quantizer .quantizer import CadenceQuantizer
@@ -53,10 +53,9 @@ def export_model(
5353 quantized_model = fuse_pt2 (converted_model , quantizer )
5454
5555 # 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+ )
6059
6160 logging .info ("Final exported graph:\n " )
6261 exec_prog .exported_program ().graph_module .graph .print_tabular ()
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ main() {
2525 -DCMAKE_BUILD_TYPE=Release \
2626 -DEXECUTORCH_BUILD_DEVTOOLS=ON \
2727 -DEXECUTORCH_ENABLE_EVENT_TRACER=ON \
28+ -DEXECUTORCH_ENABLE_LOGGING=ON \
2829 -Bcmake-out .
2930 cmake --build cmake-out --target install --config Release -j16
3031
@@ -35,6 +36,7 @@ main() {
3536 cmake -DCMAKE_PREFIX_PATH=" ${cmake_prefix_path} " \
3637 -DCMAKE_BUILD_TYPE=Release \
3738 -DEXECUTORCH_CADENCE_CPU_RUNNER=ON \
39+ -DEXECUTORCH_ENABLE_LOGGING=ON \
3840 -B" ${build_dir} " \
3941 " ${example_dir} "
4042 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
5252 "${EXECUTORCH_ROOT} /kernels/portable/cpu/op_expand_copy.cpp"
5353 "${EXECUTORCH_ROOT} /kernels/portable/cpu/op_gelu.cpp"
5454 "${EXECUTORCH_ROOT} /kernels/portable/cpu/op_empty.cpp"
55+ "${EXECUTORCH_ROOT} /kernels/portable/cpu/util/dtype_util.cpp"
5556)
5657add_library (aten_ops_cadence ${_aten_ops__srcs} )
5758target_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:
123123 ),
124124 "etdump_path" : os .path .join (self .working_dir , "etdump.etdp" ),
125125 "debug_output_path" : os .path .join (self .working_dir , "debug_output.bin" ),
126+ "dump_outputs" : "true" ,
126127 }
127128 args = self .get_bash_command (self .execute_runner , cmd_args )
128129 logging .info (f"\33 [33m{ ' ' .join (args )} \33 [0m" )
You can’t perform that action at this time.
0 commit comments