File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -156,13 +156,14 @@ build_executorch_runner() {
156156}
157157
158158cmake_install_executorch_lib () {
159+ build_type=" ${1:- Release} "
159160 echo " Installing libexecutorch.a and libportable_kernels.a"
160161 clean_executorch_install_folders
161162 retry cmake -DCMAKE_INSTALL_PREFIX=cmake-out \
162- -DCMAKE_BUILD_TYPE=Release \
163+ -DCMAKE_BUILD_TYPE=${build_type} \
163164 -DPYTHON_EXECUTABLE=" $PYTHON_EXECUTABLE " \
164165 -Bcmake-out .
165- cmake --build cmake-out -j9 --target install --config Release
166+ cmake --build cmake-out -j9 --target install --config ${build_type}
166167}
167168
168169download_stories_model_artifacts () {
Original file line number Diff line number Diff line change @@ -167,15 +167,15 @@ test_cmake_select_ops_in_model() {
167167 local example_dir=examples/selective_build
168168 local build_dir=cmake-out/${example_dir}
169169 rm -rf ${build_dir}
170- retry cmake -DCMAKE_BUILD_TYPE=Release \
170+ retry cmake -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE \
171171 -DEXECUTORCH_SELECT_OPS_FROM_MODEL=" ./mv2.pte" \
172172 -DCMAKE_INSTALL_PREFIX=cmake-out \
173173 -DPYTHON_EXECUTABLE=" $PYTHON_EXECUTABLE " \
174174 -B${build_dir} \
175175 ${example_dir}
176176
177177 echo " Building ${example_dir} "
178- cmake --build ${build_dir} -j9 --config Release
178+ cmake --build ${build_dir} -j9 --config $CMAKE_BUILD_TYPE
179179
180180 echo ' Running selective build test'
181181 ${build_dir} /selective_build_test --model_path=" ./mv2.pte"
@@ -194,9 +194,14 @@ then
194194 PYTHON_EXECUTABLE=python3
195195fi
196196
197+ if [[ -z $CMAKE_BUILD_TYPE ]];
198+ then
199+ CMAKE_BUILD_TYPE=Release
200+ fi
201+
197202if [[ $1 == " cmake" ]];
198203then
199- cmake_install_executorch_lib
204+ cmake_install_executorch_lib $CMAKE_BUILD_TYPE
200205 test_cmake_select_all_ops
201206 test_cmake_select_ops_in_list
202207 test_cmake_select_ops_in_yaml
You can’t perform that action at this time.
0 commit comments