Skip to content

Commit bfc1c75

Browse files
author
zhouwg
committed
ggml-dsp: probe QuRT RTOS information in function ggmlop_dsp_open
1 parent 186037d commit bfc1c75

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
#include "HAP_vtcm_mgr.h"
3333
#include "HAP_compute_res.h"
3434

35+
#include "qurt.h"
36+
3537
#include "AEEStdErr.h"
3638
#include "hexagon_types.h"
3739
#include "hexagon_protos.h"
@@ -886,6 +888,19 @@ int ggmlop_dsp_open(const char*uri, remote_handle64* handle) {
886888

887889
ggml_init();
888890

891+
unsigned int api_version = qurt_api_version();
892+
GGMLHEXAGON_LOG_DEBUG("api_version = 0x%x", api_version);
893+
GGMLHEXAGON_LOG_DEBUG("hvx units = 0x%d", qurt_hvx_get_units());
894+
qurt_arch_version_t vers;
895+
qurt_sysenv_get_arch_version(&vers);
896+
GGMLHEXAGON_LOG_DEBUG("arch_version=0x%x", vers.arch_version);
897+
qurt_sysenv_app_heap_t aheap;
898+
qurt_sysenv_get_app_heap(&aheap);
899+
GGMLHEXAGON_LOG_DEBUG("aheap.heap_base=0x%x, aheap.heap_limit=0x%x", aheap.heap_base, aheap.heap_limit);
900+
qurt_sysenv_max_hthreads_t mhwt;
901+
qurt_sysenv_get_max_hw_threads(&mhwt);
902+
GGMLHEXAGON_LOG_DEBUG("max hardware threads=%d", mhwt.max_hthreads);
903+
889904
return 0;
890905
}
891906

scripts/ggml-hexagon.cfg

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,7 @@ enable_all_q_mulmat = 0
102102
#ensure enable_q_mulmat = 1 when set enable_all_q_mulmat = 1
103103

104104
#enable/disable multi-threading on cDSP side
105-
# 0 disable multi-threading on cDSP side
106-
# 1 disable multi-threading on cDSP side
107-
# 2 setting thread_counts to 2 on cDSP side
108-
# 3 setting thread_counts to 3 on cDSP side
109-
# 4 setting thread_counts to 4 on cDSP side
105+
# 0 disable multi-threading on cDSP side
106+
# 1 disable multi-threading on cDSP side
107+
# 2-8 thread_counts on cDSP side
110108
thread_counts = 1

0 commit comments

Comments
 (0)