Skip to content

Commit 5b21435

Browse files
committed
add prebuilt binary libggmlop-skel.so
1 parent 24a5e69 commit 5b21435

File tree

6 files changed

+64
-6
lines changed

6 files changed

+64
-6
lines changed

prebuilts/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,35 @@
33
we should strictly follow Qualcomm's IPR policy, even in open-source community.
44

55

6+
### the [KanTV](https://github.com/kantv-ai) way
7+
8+
- Simple is the beautiful
9+
10+
we believe the philosophy of "<b>simple is beautiful</b>" which <b>comes from the great Unix</b>.
11+
12+
- Make it run, then make it right, then make it fast
13+
14+
- Explore and have fun!
15+
16+
we believe the philosophy of <b>try crazy ideas, build wild demos, and push the edge of what’s possible</b>(which is one of the core spirits of ggml-way).
17+
18+
- The rule-based order
19+
20+
we respect the rule-based order and we respect the IPR.
21+
622
### README
723

824
- QNN_SDK: a customized/tailored Qualcomm's QNN SDK for build project ggml-hexagon conveniently. the fully QNN SDK could be found at Qualcomm's offcial website: https://www.qualcomm.com/developer/software/qualcomm-ai-engine-direct-sdk
925

1026
- Hexagon_SDK: a customized/tailored Qualcomm's Hexagon SDK for build project ggml-hexagon conveniently. the fully Hexagon SDK could be found at Qualcomm's offcial website: https://developer.qualcomm.com/software/hexagon-dsp-sdk/tools. one more important thing, the fully Hexagon SDK must be obtained with a Qualcomm Developer Account.
27+
28+
- ggml-dsp: binary libggmlop-skel.so for Qualcomm Snapdragon high-end mobile SoC
29+
30+
```
31+
#available HTP(NPU) arch version:
32+
#v68 --- Snapdragon 888
33+
#v69 --- Snapdragon 8 Gen1
34+
#v73 --- Snapdragon 8 Gen2
35+
#v75 --- Snapdragon 8 Gen3
36+
#v79 --- Snapdragon 8 Elite(aka Gen4)
37+
```
973 KB
Binary file not shown.
973 KB
Binary file not shown.
973 KB
Binary file not shown.
973 KB
Binary file not shown.

scripts/build-run-android.sh

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,21 @@ HEXAGON_SDK_PATH=${PROJECT_ROOT_PATH}/prebuilts/Hexagon_SDK/6.2.0.1
4444
#v75 --- Snapdragon 8 Gen3
4545
#v79 --- Snapdragon 8 Elite(aka Gen4)
4646

47+
#8Gen1
48+
HTP_ARCH_VERSION=v69
49+
HTP_ARCH_VERSION_a=V69
50+
51+
#8Gen2
52+
HTP_ARCH_VERSION=v73
53+
HTP_ARCH_VERSION_a=V73
54+
4755
#8Gen3
4856
HTP_ARCH_VERSION=v75
4957
HTP_ARCH_VERSION_a=V75
58+
5059
#8Elite
51-
HTP_ARCH_VERSION=v79
52-
HTP_ARCH_VERSION_a=V79
60+
#HTP_ARCH_VERSION=v79
61+
#HTP_ARCH_VERSION_a=V79
5362

5463
#running_params=" -mg 2 -ngl 99 -t 8 -fa 1 "
5564
running_params=" -mg 2 -ngl 99 -t 8 "
@@ -248,6 +257,29 @@ function build_ggml_hexagon_debug()
248257
build_arm64_debug
249258
}
250259

260+
function prepare_ggmlhexagon()
261+
{
262+
adb push ./scripts/ggml-hexagon.cfg ${REMOTE_PATH}/
263+
echo "adb push ${PROJECT_ROOT_PATH}/prebuilts/ggml-dsp/libggmlop-skel${HTP_ARCH_VERSION}.so ${REMOTE_PATH}/"
264+
case "$HTP_ARCH_VERSION" in
265+
v69)
266+
adb push ${PROJECT_ROOT_PATH}/prebuilts/ggml-dsp/libggmlop-skel${HTP_ARCH_VERSION}.so ${REMOTE_PATH}/
267+
;;
268+
v73)
269+
adb push ${PROJECT_ROOT_PATH}/prebuilts/ggml-dsp/libggmlop-skel${HTP_ARCH_VERSION}.so ${REMOTE_PATH}/
270+
;;
271+
v75)
272+
adb push ${PROJECT_ROOT_PATH}/prebuilts/ggml-dsp/libggmlop-skel${HTP_ARCH_VERSION}.so ${REMOTE_PATH}/
273+
;;
274+
v79)
275+
adb push ${PROJECT_ROOT_PATH}/prebuilts/ggml-dsp/libggmlop-skel${HTP_ARCH_VERSION}.so ${REMOTE_PATH}/
276+
;;
277+
*)
278+
show_usage
279+
exit 1
280+
;;
281+
esac
282+
}
251283

252284
function prepare_run_on_phone()
253285
{
@@ -263,10 +295,9 @@ function prepare_run_on_phone()
263295
adb push ./out/android/bin/*.so ${REMOTE_PATH}/
264296
fi
265297
adb push ./out/android/bin/${program} ${REMOTE_PATH}/
266-
#for non developers: deploy dev ops once time with build outputs in ./out/android/bin/
267-
#adb push ./out/android/bin/ggml-hexagon.cfg ${REMOTE_PATH}/
268-
#for developers: modify ./scritps/ggml-hexagon.cfg before run
269-
adb push ./scripts/ggml-hexagon.cfg ${REMOTE_PATH}/
298+
299+
prepare_ggmlhexagon
300+
270301
adb shell chmod +x ${REMOTE_PATH}/${program}
271302
}
272303

0 commit comments

Comments
 (0)