Skip to content

Commit 4910c6f

Browse files
committed
[Executorch][CI] Fix qnn runner ci job scripts
QNN backend's AOT artifacts were being copied in the source directory instead of them being installed, as build artifacts, in appropriate package directory. As a result we had to use PYTHON_PATH=".." in test_llama.sh CI script when running CI for qnn. This results in executorch having two locations as where the package is installed. This PR fixes that. Differential Revision: [D66406274](https://our.internmc.facebook.com/intern/diff/D66406274/) [ghstack-poisoned]
1 parent 02b4d7d commit 4910c6f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.ci/scripts/build-qnn-sdk.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,12 @@ build_qnn_backend() {
1212
echo "Start building qnn backend."
1313
export ANDROID_NDK_ROOT=/opt/ndk
1414
export QNN_SDK_ROOT=/tmp/qnn/2.25.0.240728
15-
export EXECUTORCH_ROOT="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/../.." && pwd)"
15+
export EXECUTORCH_ROOT="$(python -c 'import executorch; print(executorch.__path__[0])')"
16+
if [ "$EXECUTORCH_ROOT" == "" ]; then
17+
echo "Failed to find where executorch package is installed."
18+
echo "import executorch failed"
19+
exit -1
20+
fi
1621

1722
bash backends/qualcomm/scripts/build.sh --skip_aarch64 --job_number 2 --release
1823
}

.ci/scripts/test_llama.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ if [[ "${MODE}" =~ .*qnn.* ]]; then
107107
export EXECUTORCH_ROOT="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)"
108108
export QNN_SDK_ROOT=/tmp/qnn/2.25.0.240728
109109
export LD_LIBRARY_PATH="${QNN_SDK_ROOT}/lib/x86_64-linux-clang"
110-
export PYTHONPATH=".."
111110
cp schema/program.fbs exir/_serialize/program.fbs
112111
cp schema/scalar_type.fbs exir/_serialize/scalar_type.fbs
113112
cp -f build-x86/backends/qualcomm/PyQnnManagerAdaptor.cpython-310-x86_64-linux-gnu.so backends/qualcomm/python

0 commit comments

Comments
 (0)