File tree 10 files changed +1522
-1604
lines changed
10 files changed +1522
-1604
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ include(CheckIncludeFileCXX)
6
6
set (CMAKE_WARN_UNUSED_CLI YES )
7
7
8
8
set (CMAKE_EXPORT_COMPILE_COMMANDS ON )
9
- set (CMAKE_VERBOSE_MAKEFILE on )
10
9
11
10
if (NOT XCODE AND NOT MSVC AND NOT CMAKE_BUILD_TYPE )
12
11
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++ )
9
9
set ( CMAKE_C_COMPILER_TARGET ${target} )
10
10
set ( CMAKE_CXX_COMPILER_TARGET ${target} )
11
11
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" )
14
14
15
15
set ( CMAKE_C_FLAGS_INIT "${arch_c_flags} ${warn_c_flags} " )
16
16
set ( CMAKE_CXX_FLAGS_INIT "${arch_c_flags} ${warn_c_flags} " )
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Android")
7
7
elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows" )
8
8
set (QNN_DEFAULT_LIB_SEARCH_PATH "C:\\ " CACHE STRING "customized library search path for QNN backend" )
9
9
elseif (CMAKE_SYSTEM_NAME STREQUAL "CYGWIN" )
10
- set (QNN_DEFAULT_LIB_SEARCH_PATH "/cygdrive/c/qairt/2.31 .0.250130 /" CACHE STRING "customized library search path for QNN backend" )
10
+ set (QNN_DEFAULT_LIB_SEARCH_PATH "/cygdrive/c/qairt/2.32 .0.250228 /" CACHE STRING "customized library search path for QNN backend" )
11
11
else ()
12
12
message (FATAL_ERROR "QNN now only available on Android and Windows(Windows on ARM)" )
13
13
endif ()
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
14
14
# https://www.qualcomm.com/developer/software/qualcomm-ai-engine-direct-sdk
15
15
# https://developer.qualcomm.com/software/hexagon-dsp-sdk/tools
16
16
QNN_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 /
18
18
19
19
# default is QNN NPU
20
20
qnnbackend=2
@@ -97,11 +97,14 @@ function check_qnn_libs()
97
97
{
98
98
# reuse the cached qnn libs on Android phone
99
99
adb shell ls ${REMOTE_PATH} /libQnnCpu.so
100
+ adb shell ls ${REMOTE_PATH} /libQnnGpu.so
101
+ adb shell ls ${REMOTE_PATH} /libQnnHtp.so
100
102
if [ $? -eq 0 ]; then
101
103
printf " QNN libs already exist on Android phone\n"
102
104
else
103
105
update_qnn_libs
104
106
fi
107
+ update_qnn_cfg
105
108
}
106
109
107
110
@@ -119,6 +122,12 @@ function update_qnn_libs()
119
122
}
120
123
121
124
125
+ function update_qnn_cfg()
126
+ {
127
+ adb push ./scripts/ggml-qnn.cfg ${REMOTE_PATH} /
128
+ }
129
+
130
+
122
131
function build_ggml_qnn()
123
132
{
124
133
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)
137
137
# llama_target_and_test(test-opt.cpp) # SLOW
138
138
llama_target_and_test(test -gguf.cpp)
139
139
llama_target_and_test(test -backend-ops.cpp)
140
- llama_target_and_test(ggml-qnn-ut.cpp)
141
140
142
141
llama_target_and_test(test -model-load-cancel.cpp LABEL "model" )
143
142
llama_target_and_test(test -autorelease.cpp LABEL "model" )
You can’t perform that action at this time.
0 commit comments