Skip to content

Commit 334aed2

Browse files
committed
Proper fix CI
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
1 parent 1446135 commit 334aed2

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

.ci/scripts/test_llama.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,23 +51,22 @@ which "${PYTHON_EXECUTABLE}"
5151
cmake_install_executorch_libraries() {
5252
echo "Installing libexecutorch.a, libextension_module.so, libportable_ops_lib.a"
5353
rm -rf cmake-out
54-
if [[ "${MODE}" == "xnnpack" ]]; then
54+
if [[ "${MODE}" =~ xnnpack.* ]]; then
5555
XNNPACK=ON
5656
else
5757
XNNPACK=OFF
5858
fi
5959
retry cmake -DBUCK2="$BUCK" \
6060
-DCMAKE_INSTALL_PREFIX=cmake-out \
6161
-DCMAKE_PREFIX_PATH=$($PYTHON_EXECUTABLE -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") \
62-
-DCMAKE_BUILD_TYPE=Release \
63-
-DEXECUTORCH_BUILD_CUSTOM=ON \
62+
-DCMAKE_BUILD_TYPE=Debug \
6463
-DEXECUTORCH_BUILD_EXTENSION_MODULE=ON \
6564
-DEXECUTORCH_BUILD_EXTENSION_DATA_LOADER=ON \
6665
-DEXECUTORCH_BUILD_OPTIMIZED=ON \
6766
-DEXECUTORCH_BUILD_XNNPACK="$XNNPACK" \
6867
-DPYTHON_EXECUTABLE="$PYTHON_EXECUTABLE" \
6968
-Bcmake-out .
70-
cmake --build cmake-out -j9 --target install --config Release
69+
cmake --build cmake-out -j9 --target install --config Debug
7170
}
7271

7372
cmake_build_llama_runner() {
@@ -76,12 +75,14 @@ cmake_build_llama_runner() {
7675
retry cmake -DBUCK2="$BUCK" \
7776
-DCMAKE_INSTALL_PREFIX=cmake-out \
7877
-DCMAKE_PREFIX_PATH=$($PYTHON_EXECUTABLE -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") \
79-
-DCMAKE_BUILD_TYPE=Release \
78+
-DCMAKE_BUILD_TYPE=Debug \
79+
-DEXECUTORCH_BUILD_CUSTOM=ON \
8080
-DEXECUTORCH_BUILD_OPTIMIZED=ON \
81+
-DEXECUTORCH_BUILD_XNNPACK=ON \
8182
-DPYTHON_EXECUTABLE="$PYTHON_EXECUTABLE" \
8283
-Bcmake-out/${dir} \
8384
${dir}
84-
cmake --build cmake-out/${dir} -j9 --config Release
85+
cmake --build cmake-out/${dir} -j9 --config Debug
8586

8687
}
8788

examples/models/llama2/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ else()
110110
endif()
111111

112112
if(EXECUTORCH_BUILD_CUSTOM)
113+
target_link_options_shared_lib(custom_ops)
113114
list(APPEND link_libraries custom_ops)
114115
endif()
115116

examples/models/llama2/custom_ops/targets.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def define_common_targets():
2828
"//executorch/examples/models/llama2/custom_ops/...",
2929
"@EXECUTORCH_CLIENTS",
3030
],
31+
link_whole = True,
3132
force_static = True,
3233
)
3334

examples/models/llama2/runner/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ else()
4747
add_library(llama_runner SHARED ${_llama_runner__srcs})
4848
endif()
4949

50-
set(llama_runner_deps executorch extension_module extension_data_loader
51-
custom_ops)
50+
set(llama_runner_deps executorch extension_module extension_data_loader)
5251

5352
target_link_libraries(
5453
llama_runner PUBLIC ${llama_runner_deps})

examples/models/llama2/runner/targets.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ def _get_operator_lib(aten = False):
44
if aten:
55
return ["//executorch/kernels/aten:generated_lib_aten"]
66
elif runtime.is_oss:
7-
return ["//executorch/kernels/portable:generated_lib"]
7+
return ["//executorch/kernels/portable:generated_lib", "//executorch/examples/models/llama2/custom_ops:custom_ops"]
88
else:
99
return ["//executorch/configurations:optimized_native_cpu_ops", "//executorch/examples/models/llama2/custom_ops:custom_ops", "//executorch/examples/models/llama2/ops:generated_lib"]
1010

0 commit comments

Comments
 (0)