-
Notifications
You must be signed in to change notification settings - Fork 637
Add stories ci for qnn #4662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add stories ci for qnn #4662
Changes from all commits
61c57ca
488e98b
b16a17b
0e4cd80
b25acc8
0cd8823
34fce2a
ebaf390
f912c76
03919c8
00024a9
12902f8
6565dbd
16992fa
8b2aa83
7f56881
ccae714
4a76821
5f8975c
822df7b
61e2b1d
14e5aa8
35101b7
6d6ad5e
f7755c9
2270a79
e451533
0def468
89b29a1
207f76c
d93f52c
757c62e
be000bd
fa09ace
5a9fe4d
67062b0
6da04ae
5174d8f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,5 +82,10 @@ COPY --chown=ci-user:ci-user ./arm /opt/arm | |
# Set up ARM SDK if needed | ||
RUN if [ -n "${ARM_SDK}" ]; then git config --global user.email "ossci@example.com"; git config --global user.name "OSS CI"; bash /opt/arm/setup.sh --i-agree-to-the-contained-eula /opt/arm-sdk; chown -R ci-user:ci-user /opt/arm-sdk; fi | ||
|
||
ARG QNN_SDK | ||
COPY --chown=ci-user:ci-user ./qualcomm /opt/qualcomm | ||
# Set up QNN SDK if needed | ||
RUN if [ -n "${QNN_SDK}" ]; then git config --global user.email "ossci@example.com"; git config --global user.name "OSS CI"; fi | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ARG QNN_SDK There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ARG QNN_SDK |
||
USER ci-user | ||
CMD ["bash"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
# Copyright (c) Meta Platforms, Inc. and affiliates. | ||
# All rights reserved. | ||
# | ||
# This source code is licensed under the BSD-style license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
set -ex | ||
|
||
build_qnn_backend() { | ||
echo "Start building qnn backend." | ||
export ANDROID_NDK_ROOT=/opt/ndk | ||
export QNN_SDK_ROOT=/tmp/qnn/2.23.0.240531 | ||
export EXECUTORCH_ROOT="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)" | ||
|
||
bash backends/qualcomm/scripts/build.sh --skip_aarch64 --job_number 2 --release | ||
} | ||
|
||
build_qnn_backend |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
# Copyright (c) Meta Platforms, Inc. and affiliates. | ||
# All rights reserved. | ||
# | ||
# This source code is licensed under the BSD-style license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
set -ex | ||
|
||
install_qnn() { | ||
echo "Start installing qnn." | ||
QNN_INSTALLATION_DIR=/tmp/qnn | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe /opt instead of /tmp ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah will address it in next diff |
||
mkdir -p "${QNN_INSTALLATION_DIR}" | ||
|
||
curl -Lo /tmp/v2.23.0.24.06.24.zip "https://softwarecenter.qualcomm.com/api/download/software/qualcomm_neural_processing_sdk/v2.23.0.24.06.24.zip" | ||
echo "Finishing downloading qnn sdk." | ||
unzip -qo /tmp/v2.23.0.24.06.24.zip -d /tmp | ||
echo "Finishing unzip qnn sdk." | ||
|
||
|
||
# Print the content for manual verification | ||
ls -lah "/tmp/qairt" | ||
mv "/tmp/qairt"/* "${QNN_INSTALLATION_DIR}" | ||
echo "Finishing installing qnn '${QNN_INSTALLATION_DIR}' ." | ||
|
||
ls -lah "${QNN_INSTALLATION_DIR}" | ||
} | ||
|
||
install_qnn |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,9 +25,9 @@ usage() { | |
[ "$1" = -h ] && usage | ||
|
||
BUILD_X86_64="true" | ||
CMAKE_X86_64="cmake-out" | ||
CMAKE_X86_64="build-x86" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @chiwwang I rename it to the similar name as before, because the ci job will clean up |
||
BUILD_AARCH64="true" | ||
CMAKE_AARCH64="cmake-out-android" | ||
CMAKE_AARCH64="build-android" | ||
CLEAN="true" | ||
BUILD_TYPE="Debug" | ||
BUILD_JOB_NUMBER="16" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not adding qnn sdk by extending the
executorch-ubuntu-22.04-clang12-android
image below? QNN backend would require ndk and cross-compilation, making it a good fit to the android imageThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not android, it's x86