Skip to content

Commit bfce743

Browse files
larryliu0820facebook-github-bot
authored andcommitted
Try to fix test_model.sh (#5361)
Summary: Trying to fix failures such as https://github.com/pytorch/executorch/actions/runs/10855583772/job/30128512970 For the time missing operator error is repro'ed on my Mac, I see cmake-out/ was not cleaned up and merged.yaml was missing linear.out because it was super old. Now without deep understanding of how CI job workers cache previous runs, I'm refactoring `build_cmake_executor_runner` in test_model.sh to make sure it always build clean. Pull Request resolved: #5361 Reviewed By: swolchok Differential Revision: D62665029 Pulled By: larryliu0820 fbshipit-source-id: 9c15c6581079b544084ae53979c995bc83cc46f9
1 parent 62024d8 commit bfce743

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

.ci/scripts/test_model.sh

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,24 +50,21 @@ prepare_artifacts_upload() {
5050

5151
build_cmake_executor_runner() {
5252
echo "Building executor_runner"
53-
(rm -rf ${CMAKE_OUTPUT_DIR} \
54-
&& mkdir ${CMAKE_OUTPUT_DIR} \
55-
&& cd ${CMAKE_OUTPUT_DIR} \
56-
&& retry cmake -DCMAKE_BUILD_TYPE=Release \
53+
rm -rf ${CMAKE_OUTPUT_DIR}
54+
cmake -DCMAKE_BUILD_TYPE=Debug \
5755
-DEXECUTORCH_BUILD_KERNELS_OPTIMIZED=ON \
58-
-DPYTHON_EXECUTABLE="$PYTHON_EXECUTABLE" ..)
56+
-DPYTHON_EXECUTABLE="$PYTHON_EXECUTABLE" \
57+
-B${CMAKE_OUTPUT_DIR} .
5958

60-
cmake --build ${CMAKE_OUTPUT_DIR} -j4
59+
cmake --build ${CMAKE_OUTPUT_DIR} -j4 --config Debug
6160
}
6261

6362
run_portable_executor_runner() {
6463
# Run test model
6564
if [[ "${BUILD_TOOL}" == "buck2" ]]; then
6665
buck2 run //examples/portable/executor_runner:executor_runner -- --model_path "./${MODEL_NAME}.pte"
6766
elif [[ "${BUILD_TOOL}" == "cmake" ]]; then
68-
if [[ ! -f ${CMAKE_OUTPUT_DIR}/executor_runner ]]; then
69-
build_cmake_executor_runner
70-
fi
67+
build_cmake_executor_runner
7168
./${CMAKE_OUTPUT_DIR}/executor_runner --model_path "./${MODEL_NAME}.pte"
7269
else
7370
echo "Invalid build tool ${BUILD_TOOL}. Only buck2 and cmake are supported atm"

0 commit comments

Comments
 (0)