66
77set -eu
88
9- script_dir=$( cd -- " $( dirname -- " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd)
9+ script_dir=$( cd -- " $( dirname -- " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd)
1010et_root_dir=$( cd ${script_dir} /../../.. && pwd)
1111et_root_dir=$( realpath ${et_root_dir} )
1212setup_path_script=${et_root_dir} /examples/arm/ethos-u-scratch/setup_path.sh
1313_setup_msg=" please refer to ${et_root_dir} /examples/arm/setup.sh to properly install necessary tools."
14- source " ${script_dir} /utils.sh"
15-
1614build_type=" Release"
1715build_with_etdump=false
1816extra_build_flags=" "
1917output_folder=" cmake-out-vkml"
18+ build_with_etdump_flags=" -DEXECUTORCH_ENABLE_EVENT_TRACER=OFF"
19+ build_with_bundleio_flags=" -DEXECUTORCH_ENABLE_BUNDLE_IO=OFF"
20+
21+ source " ${script_dir} /utils.sh"
22+
2023
21- build_with_etdump_flags=" -DEXECUTORCH_ENABLE_EVENT_TRACER=OFF -DEXECUTORCH_BUILD_DEVTOOLS=OFF"
2224help () {
2325 echo " Usage: $( basename $0 ) [options]"
2426 echo " Options:"
25- echo " --build_type=<TYPE> Build with Release, Debug or RelWithDebInfo, default is ${build_type} "
26- echo " --etdump Adds Devtools etdump support to track timing, etdump area will be base64 encoded in the log"
27- echo " --extra_build_flags=<FLAGS> Extra flags to pass to cmake. Default: none "
28- echo " --output=<FOLDER> Output folder Default: $( output_folder) "
27+ echo " --build_type=<TYPE> Build with Release, Debug or RelWithDebInfo, default is ${build_type} "
28+ echo " --etdump Adds Devtools etdump support to track timing, etdump area will be base64 encoded in the log"
29+ echo " --extra_build_flags=<FLAGS> Extra flags to pass to cmake. Default: none "
30+ echo " --output=<FOLDER> Output folder Default: $( output_folder) "
31+ echo " --bundleio Support BundleIO using Devtools with Input/RefOutput included"
2932 exit 0
3033}
3134
3235for arg in " $@ " ; do
3336 case $arg in
34- -h|--help) help ;;
35- --build_type=* ) build_type=" ${arg#* =} " ;;
36- --etdump) build_with_etdump=true ;;
37- --extra_build_flags=* ) extra_build_flags=" ${arg#* =} " ;;
38- --output=* ) output_folder=" ${arg#* =} " ;;
39- --select_ops_list=* ) select_ops_list=" ${arg#* =} " ;;
40- * )
41- ;;
37+ -h|--help) help ;;
38+ --build_type=* ) build_type=" ${arg#* =} " ;;
39+ --etdump) build_with_etdump=true ;;
40+ --extra_build_flags=* ) extra_build_flags=" ${arg#* =} " ;;
41+ --output=* ) output_folder=" ${arg#* =} " ;;
42+ --select_ops_list=* ) select_ops_list=" ${arg#* =} " ;;
43+ --bundleio) build_with_bundleio_flags=" -DEXECUTORCH_ENABLE_BUNDLE_IO=ON" ;;
44+ * )
45+ ;;
4246 esac
4347done
4448
@@ -52,23 +56,24 @@ source ${setup_path_script}
5256mkdir -p " ${output_folder} "
5357output_folder=$( realpath " ${output_folder} " )
5458
55- echo " --------------------------------------------------------------------------------"
56- echo " Build Arm VKML executor runner: '${output_folder} ' with extra build flags: ${extra_build_flags} "
57- echo " --------------------------------------------------------------------------------"
58-
5959cd ${et_root_dir} /examples/arm/executor_runner
6060
6161if [ " $build_with_etdump " = true ] ; then
62- build_with_etdump_flags=" -DEXECUTORCH_ENABLE_EVENT_TRACER=ON -DEXECUTORCH_BUILD_DEVTOOLS=ON "
62+ build_with_etdump_flags=" -DEXECUTORCH_ENABLE_EVENT_TRACER=ON"
6363fi
6464
65- echo " Building with extra flags: ${build_with_etdump_flags} ${extra_build_flags} "
65+ echo " -----------------------------------------------------------------------------------------------"
66+ echo " Build Arm VKML executor runner: '${output_folder} ' with extra build flags: "
67+ echo " ${build_with_etdump_flags} ${build_with_bundleio_flags} ${extra_build_flags} "
68+ echo " -----------------------------------------------------------------------------------------------"
69+
6670cmake \
6771 -S " ${et_root_dir} " \
6872 -B " ${output_folder} " \
6973 -Wall \
7074 -Werror \
7175 -DCMAKE_BUILD_TYPE=${build_type} \
76+ -DCMAKE_CXX_FLAGS=" ${extra_build_flags} ${CMAKE_CXX_FLAGS:- } " \
7277 -DEXECUTORCH_BUILD_EXTENSION_DATA_LOADER=ON \
7378 -DEXECUTORCH_BUILD_EXTENSION_MODULE=ON \
7479 -DEXECUTORCH_BUILD_EXTENSION_NAMED_DATA_MAP=ON \
@@ -80,9 +85,10 @@ cmake \
8085 -DEXECUTORCH_BUILD_KERNELS_QUANTIZED=ON \
8186 -DEXECUTORCH_BUILD_KERNELS_QUANTIZED_AOT=ON \
8287 -DEXECUTORCH_ENABLE_LOGGING=ON \
88+ -DEXECUTORCH_BUILD_DEVTOOLS=ON \
8389 -DPYTHON_EXECUTABLE=" $( which python3) " \
84- ${build_with_etdump_flags} \
85- ${extra_build_flags }
90+ ${build_with_etdump_flags} \
91+ ${build_with_bundleio_flags }
8692
8793echo " [${BASH_SOURCE[0]} ] Configured CMAKE"
8894
0 commit comments