File tree Expand file tree Collapse file tree 9 files changed +1510
-1600
lines changed Expand file tree Collapse file tree 9 files changed +1510
-1600
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ include(CheckIncludeFileCXX)
66set (CMAKE_WARN_UNUSED_CLI YES )
77
88set (CMAKE_EXPORT_COMPILE_COMMANDS ON )
9- set (CMAKE_VERBOSE_MAKEFILE on )
109
1110if (NOT XCODE AND NOT MSVC AND NOT CMAKE_BUILD_TYPE )
1211 set (CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ set( CMAKE_CXX_COMPILER clang++ )
99set ( CMAKE_C_COMPILER_TARGET ${target} )
1010set ( CMAKE_CXX_COMPILER_TARGET ${target} )
1111
12- # set( arch_c_flags "-march=armv8.7-a -fvectorize -ffp-model=fast -fno-finite-math-only" )
13- # set( warn_c_flags "-Wno-format -Wno-unused-variable -Wno-unused-function -Wno-gnu-zero-variadic-macro-arguments" )
12+ set ( arch_c_flags "-march=armv8.7-a -fvectorize -ffp-model=fast -fno-finite-math-only" )
13+ set ( warn_c_flags "-Wno-format -Wno-unused-variable -Wno-unused-function -Wno-gnu-zero-variadic-macro-arguments" )
1414
1515set ( CMAKE_C_FLAGS_INIT "${arch_c_flags} ${warn_c_flags} " )
1616set ( CMAKE_CXX_FLAGS_INIT "${arch_c_flags} ${warn_c_flags} " )
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ GGUF_MODEL_NAME=/sdcard/qwen1_5-1_8b-chat-q4_0.gguf
1414# https://www.qualcomm.com/developer/software/qualcomm-ai-engine-direct-sdk
1515# https://developer.qualcomm.com/software/hexagon-dsp-sdk/tools
1616QNN_SDK_URL=https://www.qualcomm.com/developer/software/qualcomm-ai-engine-direct-sdk
17- QNN_SDK_PATH=/opt/qcom/aistack/qairt/2.31 .0.250130 /
17+ QNN_SDK_PATH=/opt/qcom/aistack/qairt/2.32 .0.250228 /
1818
1919# default is QNN NPU
2020qnnbackend=2
@@ -97,11 +97,14 @@ function check_qnn_libs()
9797{
9898 # reuse the cached qnn libs on Android phone
9999 adb shell ls ${REMOTE_PATH} /libQnnCpu.so
100+ adb shell ls ${REMOTE_PATH} /libQnnGpu.so
101+ adb shell ls ${REMOTE_PATH} /libQnnHtp.so
100102 if [ $? -eq 0 ]; then
101103 printf " QNN libs already exist on Android phone\n"
102104 else
103105 update_qnn_libs
104106 fi
107+ update_qnn_cfg
105108}
106109
107110
@@ -119,6 +122,12 @@ function update_qnn_libs()
119122}
120123
121124
125+ function update_qnn_cfg()
126+ {
127+ adb push ./scripts/ggml-qnn.cfg ${REMOTE_PATH} /
128+ }
129+
130+
122131function build_ggml_qnn()
123132{
124133 show_pwd
Original file line number Diff line number Diff line change 1+ [general]
2+ # enable/disable QNN's internal log
3+ print_qnn_internal_log = 0
4+ # 0: general approach,similar to ggml-sycl or ggml-cann
5+ # 1: mapping entire ggml cgraph to QNN graph
6+ inference_approach = 0
7+
8+ [npu]
9+ npu_inference_datatype = " fp16"
Original file line number Diff line number Diff line change @@ -137,7 +137,6 @@ llama_target_and_test(test-chat-template.cpp)
137137# llama_target_and_test(test-opt.cpp) # SLOW
138138llama_target_and_test(test -gguf.cpp)
139139llama_target_and_test(test -backend-ops.cpp)
140- llama_target_and_test(ggml-qnn-ut.cpp)
141140
142141llama_target_and_test(test -model-load-cancel.cpp LABEL "model" )
143142llama_target_and_test(test -autorelease.cpp LABEL "model" )
You can’t perform that action at this time.
0 commit comments