@@ -367,7 +367,7 @@ struct ggml_backend_hexagon_buffer_context {
367367 ggml_backend_hexagon_buffer_context (ggml_hexagon_session * sess, size_t size, bool repack) {
368368 size += 4 * 1024 ; // extra page for padding
369369
370- this ->base = (uint8_t *) rpcmem_alloc2 (RPCMEM_HEAP_ID_SYSTEM, RPCMEM_DEFAULT_FLAGS | RPCMEM_HEAP_NOREG, size);
370+ this ->base = (uint8_t *) rpcmem_alloc (RPCMEM_HEAP_ID_SYSTEM, RPCMEM_DEFAULT_FLAGS | RPCMEM_HEAP_NOREG, size);
371371 if (!this ->base ) {
372372 GGML_LOG_ERROR (" ggml-hex: %s failed to allocate buffer : size %zu\n " , sess->name .c_str (), size);
373373 throw std::runtime_error (" ggml-hex: rpcmem_alloc failed (see log for details)" );
@@ -1683,7 +1683,7 @@ void ggml_hexagon_session::allocate(int dev_id) noexcept(false) {
16831683 sprintf (htp_uri, " file:///libggml-htp-v%u.so?htp_iface_skel_handle_invoke&_modver=1.0" , opt_arch);
16841684
16851685 char session_uri[256 ];
1686- {
1686+ if ( false ) {
16871687 struct remote_rpc_get_uri u;
16881688 u.session_id = this ->session_id ;
16891689 u.domain_name = const_cast <char *>(CDSP_DOMAIN_NAME);
@@ -1698,6 +1698,10 @@ void ggml_hexagon_session::allocate(int dev_id) noexcept(false) {
16981698 GGML_LOG_ERROR (" ggml-hex: failed to get URI for session %d : error 0x%x\n " , dev_id, err);
16991699 throw std::runtime_error (" ggml-hex: remote_session_control(get-uri) failed (see log for details)" );
17001700 }
1701+ } else {
1702+ int htp_URI_domain_len = strlen (htp_uri) + MAX_DOMAIN_NAMELEN;
1703+
1704+ snprintf (session_uri, htp_URI_domain_len, " %s%s" , htp_uri, my_domain->uri );
17011705 }
17021706
17031707 // Enable Unsigned PD
0 commit comments