Skip to content

Commit b8a47ee

Browse files
committed
ggml-hexagon: forward compatible with Qualcomm's new SDK
1 parent 6a67b64 commit b8a47ee

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

ggml/src/ggml-hexagon/ggml-hexagon.cpp

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2150,10 +2150,10 @@ static void ggmlhexagon_print_running_timestamp(ggml_backend_hexagon_context * c
21502150
GGMLHEXAGON_LOG_INFO("offload quantize GGML_OP_MUL_MAT: %s", g_hexagon_appcfg.enable_q_mulmat ? "YES" : "NO");
21512151
GGMLHEXAGON_LOG_INFO("using rpc ion memory pool: %s", g_hexagon_appcfg.enable_rpc_ion_mempool ? "YES" : "NO");
21522152
GGMLHEXAGON_LOG_INFO("thread_counts with HWACCEL_CDSP: %d", g_hexagon_appcfg.thread_counts);
2153-
GGMLHEXAGON_LOG_INFO("mulmat algo type on cDSP : %d", g_hexagon_appcfg.mulmat_algotype);
2153+
GGMLHEXAGON_LOG_INFO("mulmat algo type on cDSP: %d", g_hexagon_appcfg.mulmat_algotype);
21542154
ggmlhexagon_probe_dspinfo(ctx);
21552155
} else {
2156-
GGMLHEXAGON_LOG_INFO("thread_counts with HWACCEL_QNN: %d", g_hexagon_appcfg.hvx_threads);
2156+
GGMLHEXAGON_LOG_INFO("thread_counts with HWACCEL_QNN: %d", g_hexagon_appcfg.hvx_threads);
21572157
GGMLHEXAGON_LOG_INFO("offload quantize GGML_OP_MUL_MAT: %s", g_hexagon_appcfg.enable_q_mulmat ? "YES" : "NO");
21582158
}
21592159
GGMLHEXAGON_LOG_INFO("running timestamp:%s", timestamp);
@@ -4918,7 +4918,20 @@ static int ggmlhexagon_get_domains_info(const char * domain_type, int * num_doma
49184918
int hexagon_err = AEE_SUCCESS;
49194919
int ss_info = 0;
49204920
void * buffer = nullptr;
4921-
ss_info = strcmp(domain_type, "NSP")? HPASS: NSP;
4921+
#if 0
4922+
typedef enum {
4923+
/** Flag to be used to query list of all available domains */
4924+
ALL_DOMAINS,
4925+
NSP,
4926+
LPASS,
4927+
SDSP,
4928+
MODEM,
4929+
HPASS,
4930+
} fastrpc_domain_type;
4931+
#endif
4932+
//ss_info = strcmp(domain_type, "NSP") ? HPASS: NSP;
4933+
//forward compatible with new SDK
4934+
ss_info = (0 == memcmp(domain_type, "NSP", 3)) ? 1 : 5;
49224935
system_req_payload req;
49234936
memset(&req, 0, sizeof(system_req_payload));
49244937
req.id = FASTRPC_GET_DOMAINS;

scripts/build-run-android.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ HEXAGON_SDK_PATH=/opt/qcom/Hexagon_SDK/6.2.0.1
4949
#customized/tailored Hexagon SDK from the offcial Hexagon SDK for simplify workflow
5050
HEXAGON_SDK_PATH=${PROJECT_ROOT_PATH}/prebuilts/Hexagon_SDK/6.2.0.1
5151

52-
#running_params=" -ngl 99 -t 8 -n 256 --no-warmup -fa 1 "
53-
running_params=" -ngl 99 -t 8 -n 256 --no-warmup "
52+
#running_params=" -ngl 99 -t 4 -n 256 --no-warmup -fa 1 "
53+
running_params=" -ngl 99 -t 4 -n 256 --no-warmup "
5454

5555
#available prebuilt libs can be found at prebuilts/ggml-dsp
5656
GGMLDSP_RELEASE_DATE=20250531

0 commit comments

Comments
 (0)