File tree Expand file tree Collapse file tree 4 files changed +61
-4
lines changed Expand file tree Collapse file tree 4 files changed +61
-4
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ set -o xtrace
11
11
build_qnn_backend () {
12
12
echo " Start building qnn backend."
13
13
export ANDROID_NDK_ROOT=/opt/ndk
14
- export QNN_SDK_ROOT=/tmp/qnn/2.23 .0.240531
14
+ export QNN_SDK_ROOT=/tmp/qnn/2.25 .0.240728
15
15
export EXECUTORCH_ROOT=" $( cd -- " $( dirname -- " ${BASH_SOURCE[0]} " ) /../.." && pwd) "
16
16
17
17
bash backends/qualcomm/scripts/build.sh --skip_aarch64 --job_number 2 --release
Original file line number Diff line number Diff line change 7
7
8
8
set -ex
9
9
10
+ verify_pkg_installed () {
11
+ echo $( dpkg-query -W --showformat=' ${Status}\n' $1 | grep " install ok installed" )
12
+ }
13
+
10
14
install_qnn () {
11
15
echo " Start installing qnn."
12
16
QNN_INSTALLATION_DIR=/tmp/qnn
13
17
mkdir -p " ${QNN_INSTALLATION_DIR} "
14
18
15
- 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"
19
+ curl -Lo /tmp/v2.25 .0.24.07.28 .zip " https://softwarecenter.qualcomm.com/api/download/software/qualcomm_neural_processing_sdk/v2.25 .0.240728 .zip"
16
20
echo " Finishing downloading qnn sdk."
17
- unzip -qo /tmp/v2.23 .0.24.06.24 .zip -d /tmp
21
+ unzip -qo /tmp/v2.25 .0.24.07.28 .zip -d /tmp
18
22
echo " Finishing unzip qnn sdk."
19
23
20
24
@@ -26,4 +30,22 @@ install_qnn() {
26
30
ls -lah " ${QNN_INSTALLATION_DIR} "
27
31
}
28
32
33
+ setup_libc++ () {
34
+ sudo apt-get update
35
+ pkgs_to_check=(' libc++-dev' )
36
+ j=0
37
+ while [ $j -lt ${# pkgs_to_check[*]} ]; do
38
+ install_status=$( verify_pkg_installed ${pkgs_to_check[$j]} )
39
+ if [ " $install_status " == " " ]; then
40
+ sudo apt-get install -y ${pkgs_to_check[$j]}
41
+ if [[ $? -ne 0 ]]; then
42
+ echo " ERROR: Failed to install required packages for libc++"
43
+ exit 1
44
+ fi
45
+ fi
46
+ j=$(( $j + 1 )) ;
47
+ done
48
+ }
49
+
50
+ setup_libc++
29
51
install_qnn
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ echo "COREML option ${COREML}"
75
75
if [[ " ${MODE} " =~ .* qnn.* ]]; then
76
76
QNN=ON
77
77
export EXECUTORCH_ROOT=" $( cd -- " $( dirname -- " ${BASH_SOURCE[0]} " ) /.." && pwd) "
78
- export QNN_SDK_ROOT=/tmp/qnn/2.23 .0.240531
78
+ export QNN_SDK_ROOT=/tmp/qnn/2.25 .0.240728
79
79
export LD_LIBRARY_PATH=" ${QNN_SDK_ROOT} /lib/x86_64-linux-clang"
80
80
export PYTHONPATH=" .."
81
81
cp schema/program.fbs exir/_serialize/program.fbs
Original file line number Diff line number Diff line change @@ -372,3 +372,38 @@ jobs:
372
372
373
373
# Run pytest with coverage
374
374
pytest -c /dev/null -v -n auto --cov=./ --cov-report=xml backends/arm/test
375
+
376
+
377
+ test-llama-runner-qnn-linux :
378
+ name : test-llama-runner-qnn-linux
379
+ uses : pytorch/test-infra/.github/workflows/linux_job.yml@main
380
+ strategy :
381
+ matrix :
382
+ dtype : [fp32]
383
+ build-tool : [cmake]
384
+ mode : [qnn]
385
+ fail-fast : false
386
+ with :
387
+ runner : linux.2xlarge
388
+ docker-image : executorch-ubuntu-22.04-clang12-android
389
+ submodules : ' true'
390
+ ref : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
391
+ timeout : 900
392
+ script : |
393
+ # The generic Linux job chooses to use base env, not the one setup by the image
394
+ CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
395
+ conda activate "${CONDA_ENV}"
396
+
397
+ DTYPE=${{ matrix.dtype }}
398
+ BUILD_TOOL=${{ matrix.build-tool }}
399
+ MODE=${{ matrix.mode }}
400
+
401
+ PYTHON_EXECUTABLE=python bash .ci/scripts/setup-qnn-deps.sh
402
+ PYTHON_EXECUTABLE=python bash .ci/scripts/build-qnn-sdk.sh
403
+
404
+ # Setup executorch
405
+ PYTHON_EXECUTABLE=python bash .ci/scripts/setup-linux.sh buck2
406
+ # Install requirements for export_llama
407
+ PYTHON_EXECUTABLE=python bash examples/models/llama2/install_requirements.sh
408
+ # Test llama2
409
+ PYTHON_EXECUTABLE=python bash .ci/scripts/test_llama.sh stories110M "${BUILD_TOOL}" "${DTYPE}" "${MODE}"
You can’t perform that action at this time.
0 commit comments