Skip to content

Commit e00955e

Browse files
author
zhouwg
committed
ggml-hexagon: setting enable_rpc_ion_mempool to 1 and make test-backend-ops happy
1 parent f852cd4 commit e00955e

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ static struct hexagon_appcfg_t g_hexagon_appcfg = {
359359
#elif defined(_WIN32)
360360
.qnn_runtimelib_path = "C:\\",
361361
#endif
362-
.ggml_hexagon_version = {"1.03"},
362+
.ggml_hexagon_version = {"1.04"},
363363
.ggml_dsp_version = {"0.61"},
364364
};
365365

@@ -5107,9 +5107,8 @@ static int ggmlhexagon_init_rpcmempool(ggml_backend_hexagon_context * ctx) {
51075107
GGML_ASSERT(ctx->rpc_mempool_capacity > (8 * SIZE_IN_MB));
51085108
ctx->rpc_mempool_len = ctx->rpc_mempool_capacity - (8 * SIZE_IN_MB);
51095109

5110-
//FIXME: it seems there is unknown issue with another ION memory pool
5111-
ctx->rpc_mempool = rpcmem_alloc(RPCMEM_HEAP_ID_SYSTEM, RPCMEM_DEFAULT_FLAGS,
5112-
ctx->rpc_mempool_len);
5110+
//FIXME: it seems there is unknown issue with 2+ GiB memory pool
5111+
ctx->rpc_mempool = rpcmem_alloc(RPCMEM_HEAP_ID_SYSTEM, RPCMEM_DEFAULT_FLAGS | RPCMEM_TRY_MAP_STATIC, ctx->rpc_mempool_len);
51135112
if (nullptr == ctx->rpc_mempool) {
51145113
GGMLHEXAGON_LOG_WARN("alloc rpc memorypool %d failed", ctx->rpc_mempool_len);
51155114
return 2;

ggml/src/ggml-hexagon/kernels/ggml-dsp.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -888,8 +888,7 @@ int ggmlop_dsp_open(const char*uri, remote_handle64* handle) {
888888

889889
ggml_init();
890890

891-
unsigned int api_version = qurt_api_version();
892-
GGMLHEXAGON_LOG_DEBUG("api_version = 0x%x", api_version);
891+
GGMLHEXAGON_LOG_DEBUG("api_version = 0x%x", qurt_api_version());
893892
GGMLHEXAGON_LOG_DEBUG("hvx units = 0x%d", qurt_hvx_get_units());
894893
qurt_arch_version_t vers;
895894
qurt_sysenv_get_arch_version(&vers);

scripts/ggml-hexagon.cfg

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#
2424
[general]
2525
#version of ggml-hexagon.cpp on ARM-AP side
26-
version = "1.03"
26+
version = "1.04"
2727
#version of ggml-dsp.c on cDSP side
2828
ggmldsp_version = "0.61"
2929

@@ -69,8 +69,8 @@ enable_perf = 1
6969

7070

7171
# enablie/disable profiler feature to visually compare NPU performance between HWACCEL_CDSP and HWACCEL_QNN
72-
# this is not default setting but useful before PR in upstream can be approved
73-
enable_profiler = 1
72+
# this is default setting
73+
enable_profiler = 0
7474
#threshold duration of NPU performance profiler, per seconds
7575
profiler_duration = 5
7676
#threshold counst of NPU performance profiler
@@ -94,7 +94,7 @@ precision_mode = "fp16"
9494
#hwaccel approach through cDSP(offload ggml op to Hexagon cDSP directly)
9595
[cdsp]
9696
#enable/disable rpc ion memory pool
97-
enable_rpc_ion_mempool = 0
97+
enable_rpc_ion_mempool = 1
9898

9999
#enable/disable offload all quantized type mulmat to cDSP
100100
enable_all_q_mulmat = 0

0 commit comments

Comments
 (0)