File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -206,6 +206,10 @@ jobs:
206
206
name : build-llm-demo
207
207
uses : pytorch/test-infra/.github/workflows/linux_job.yml@main
208
208
needs : set-parameters
209
+ strategy :
210
+ matrix :
211
+ delegate : ${{ fromJson(needs.set-parameters.outputs.delegates) }}
212
+ fail-fast : false
209
213
with :
210
214
runner : linux.2xlarge
211
215
docker-image : executorch-ubuntu-22.04-clang12-android
@@ -222,6 +226,11 @@ jobs:
222
226
PYTHON_EXECUTABLE=python bash .ci/scripts/setup-linux.sh cmake
223
227
export ARTIFACTS_DIR_NAME=artifacts-to-be-uploaded
224
228
229
+ if [[ ${{ matrix.delegate }} == "qnn" ]]; then
230
+ PYTHON_EXECUTABLE=python bash .ci/scripts/setup-qnn-deps.sh
231
+ PYTHON_EXECUTABLE=python bash .ci/scripts/build-qnn-sdk.sh
232
+ fi
233
+
225
234
# TODO: This needs to be replaced with a generic loader .apk
226
235
# Build LLM Demo for Android
227
236
bash build/build_android_llm_demo.sh ${ARTIFACTS_DIR_NAME}
Original file line number Diff line number Diff line change @@ -19,6 +19,13 @@ build_android_native_library() {
19
19
ANDROID_ABI=" $1 "
20
20
ANDROID_NDK=" ${ANDROID_NDK:-/ opt/ ndk} "
21
21
CMAKE_OUT=" cmake-out-android-${ANDROID_ABI} "
22
+ QNN_SDK_ROOT=" ${QNN_SDK_ROOT:- } "
23
+ if [ -n " $QNN_SDK_ROOT " ]; then
24
+ EXECUTORCH_BUILD_QNN=ON
25
+ else
26
+ EXECUTORCH_BUILD_QNN=OFF
27
+ fi
28
+
22
29
23
30
cmake . -DCMAKE_INSTALL_PREFIX=" ${CMAKE_OUT} " \
24
31
-DCMAKE_TOOLCHAIN_FILE=" ${ANDROID_NDK} /build/cmake/android.toolchain.cmake" \
@@ -34,6 +41,8 @@ build_android_native_library() {
34
41
-DEXECUTORCH_BUILD_KERNELS_OPTIMIZED=ON \
35
42
-DEXECUTORCH_BUILD_KERNELS_QUANTIZED=ON \
36
43
-DEXECUTORCH_BUILD_KERNELS_CUSTOM=ON \
44
+ -DEXECUTORCH_BUILD_QNN=" ${EXECUTORCH_BUILD_QNN} " \
45
+ -DQNN_SDK_ROOT=" ${QNN_SDK_ROOT} " \
37
46
-DCMAKE_BUILD_TYPE=Release \
38
47
-B" ${CMAKE_OUT} "
39
48
You can’t perform that action at this time.
0 commit comments