Skip to content

Commit a497749

Browse files
committed
Added cmake-format and lint check changes
1 parent bf753ee commit a497749

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

.ci/scripts/test_model.sh

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,21 @@ build_cmake_executor_runner() {
5252
local backend_string_select="${1:-}"
5353
echo "Building executor_runner"
5454
rm -rf ${CMAKE_OUTPUT_DIR}
55-
if [[ "$backend_string_select" == "XNNPACK"]]; then
55+
mkdir ${CMAKE_OUTPUT_DIR}
56+
if [[ "$backend_string_select" == "XNNPACK" ]]; then
5657
echo "Backend $backend_string_select selected"
57-
cmake -DCMAKE_BUILD_TYPE=Debug \
58-
-DEXECUTORCH_BUILD_KERNELS_OPTIMIZED=ON \
58+
(cd ${CMAKE_OUTPUT_DIR} \
59+
&& cmake -DCMAKE_BUILD_TYPE=Release \
5960
-DEXECUTORCH_BUILD_XNNPACK=ON \
60-
-DPYTHON_EXECUTABLE="$PYTHON_EXECUTABLE" \
61-
-B${CMAKE_OUTPUT_DIR} .
61+
-DPYTHON_EXECUTABLE="$PYTHON_EXECUTABLE" ..)
62+
cmake --build ${CMAKE_OUTPUT_DIR} -j4
6263
else
6364
cmake -DCMAKE_BUILD_TYPE=Debug \
6465
-DEXECUTORCH_BUILD_KERNELS_OPTIMIZED=ON \
6566
-DPYTHON_EXECUTABLE="$PYTHON_EXECUTABLE" \
6667
-B${CMAKE_OUTPUT_DIR} .
68+
cmake --build ${CMAKE_OUTPUT_DIR} -j4 --config Debug
6769
fi
68-
cmake --build ${CMAKE_OUTPUT_DIR} -j4 --config Debug
6970
}
7071

7172
run_portable_executor_runner() {
@@ -148,7 +149,7 @@ test_model_with_xnnpack() {
148149
buck2 run //examples/xnnpack:xnn_executor_runner -- --model_path "${OUTPUT_MODEL_PATH}"
149150
elif [[ "${BUILD_TOOL}" == "cmake" ]]; then
150151
if [[ ! -f ${CMAKE_OUTPUT_DIR}/executor_runner ]]; then
151-
build_cmake_executor_runner("XNNPACK")
152+
build_cmake_executor_runner "XNNPACK"
152153
fi
153154
./${CMAKE_OUTPUT_DIR}/executor_runner --model_path "${OUTPUT_MODEL_PATH}"
154155
else

backends/xnnpack/CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,10 @@ foreach(fbs_file ${_xnnpack_schema__srcs})
6161
endforeach()
6262

6363
if(WIN32)
64-
set(MV_COMMAND powershell -Command "Move-Item -Path ${_xnnpack_flatbuffer__outputs} -Destination ${_xnnpack_schema__outputs}")
64+
set(MV_COMMAND
65+
powershell -Command
66+
"Move-Item -Path ${_xnnpack_flatbuffer__outputs} -Destination ${_xnnpack_schema__outputs}"
67+
)
6568
else()
6669
set(MV_COMMAND mv ${_xnnpack_flatbuffer__outputs} ${_xnnpack_schema__outputs})
6770
endif()
@@ -96,7 +99,8 @@ include(cmake/Dependencies.cmake)
9699
list(TRANSFORM _xnnpack_backend__srcs PREPEND "${EXECUTORCH_ROOT}/")
97100
add_library(xnnpack_backend ${_xnnpack_backend__srcs})
98101
target_link_libraries(
99-
xnnpack_backend PUBLIC ${xnnpack_third_party} executorch_core xnnpack_schema extension_threadpool
102+
xnnpack_backend PUBLIC ${xnnpack_third_party} executorch_core xnnpack_schema
103+
extension_threadpool
100104
)
101105

102106
target_include_directories(

0 commit comments

Comments
 (0)