@@ -4473,7 +4473,7 @@ static bool ggmlhexagon_is_async_fastrpc_supported(int domain) {
44734473 return false ;
44744474}
44754475
4476- static void ggmlhexagon_set_rpc_latency (int domain , int qos, int latency) {
4476+ static void ggmlhexagon_set_rpc_latency (remote_handle64 handle , int qos, int latency) {
44774477 int hexagon_error = AEE_SUCCESS;
44784478
44794479 if (remote_handle_control) {
@@ -4486,9 +4486,8 @@ static void ggmlhexagon_set_rpc_latency(int domain, int qos, int latency) {
44864486*/
44874487 data.enable = qos;
44884488 data.latency = latency;
4489- hexagon_error = remote_handle64_control (DSPRPC_GET_DSP_INFO , DSPRPC_CONTROL_LATENCY, (void *)&data, sizeof (data));
4489+ hexagon_error = remote_handle64_control (handle , DSPRPC_CONTROL_LATENCY, (void *)&data, sizeof (data));
44904490 if (hexagon_error != AEE_SUCCESS) {
4491- // FIXME: why set rpc latency failure
44924491 GGMLHEXAGON_LOG_WARN (" failed with error 0x%x" , hexagon_error);
44934492 goto bail;
44944493 } else {
@@ -4940,7 +4939,7 @@ static int ggmlhexagon_init_dsp(ggml_backend_hexagon_context * ctx) {
49404939 GGMLHEXAGON_LOG_INFO (" only support offload GGML_OP_ADD and GGML_OP_MUL_MAT to cDSP currently" );
49414940 ggmlhexagon_probe_dspinfo (ctx);
49424941 ggmlop_dsp_setclocks (ctx->ggmlop_handle , HAP_DCVS_VCORNER_TURBO_PLUS, 40 , 1 );
4943- ggmlhexagon_set_rpc_latency (domain_id, RPC_PM_QOS, 100 );
4942+ ggmlhexagon_set_rpc_latency (ctx-> ggmlop_handle , RPC_POLL_QOS, 1000 );
49444943 ggmlhexagon_init_rpcmempool (ctx);
49454944 } else {
49464945 GGMLHEXAGON_LOG_INFO (" error 0x%x: failed to open domain %d(%s)" , hexagon_error, domain_id,
0 commit comments