Skip to content

Commit 5c12c2e

Browse files
committed
Refactor ggml-hexagon.cpp to remove commented-out code and improve clarity in domain handling
1 parent dc732d3 commit 5c12c2e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4755,7 +4755,7 @@ static bool ggmlhexagon_is_valid_domain_id(int domain_id, int compute_only) {
47554755
return false;
47564756
}
47574757

4758-
/*static int ggmlhexagon_get_domains_info(const char * domain_type, int * num_domains, fastrpc_domain ** domains_info) {
4758+
static int ggmlhexagon_get_domains_info(const char * domain_type, int * num_domains, fastrpc_domain ** domains_info) {
47594759
int hexagon_err = AEE_SUCCESS;
47604760
int ss_info = 0;
47614761
void * buffer = nullptr;
@@ -4814,7 +4814,7 @@ static bool ggmlhexagon_is_valid_domain_id(int domain_id, int compute_only) {
48144814
free(req.sys.domains);
48154815
}
48164816
return hexagon_err;
4817-
}*/
4817+
}
48184818

48194819
static int ggmlhexagon_get_dsp_support(int * domain) {
48204820
int hexagon_error = AEE_SUCCESS;
@@ -5355,7 +5355,7 @@ static int ggmlhexagon_init_dsp(ggml_backend_hexagon_context * ctx) {
53555355
bool is_unsignedpd_enabled = false;
53565356
int use_logical_id = 0;
53575357
int core_id = -1;
5358-
//fastrpc_domain * domains_info = NULL;
5358+
fastrpc_domain * domains_info = NULL;
53595359
int num_domains = -1;
53605360

53615361
domain * my_domain = NULL;
@@ -5373,7 +5373,7 @@ static int ggmlhexagon_init_dsp(ggml_backend_hexagon_context * ctx) {
53735373
}
53745374
ctx->ggmlop_handle = 0;
53755375

5376-
/*if (-1 == domain_id) {
5376+
if (-1 == domain_id) {
53775377
if (nullptr != domain_type) {
53785378
if ((strcmp(domain_type, "NSP") != 0 && strcmp(domain_type, "HPASS") != 0)) {
53795379
GGMLHEXAGON_LOG_WARN("invalid domain_type %s. possible values are NSP or HPASS", domain_type);
@@ -5410,7 +5410,7 @@ static int ggmlhexagon_init_dsp(ggml_backend_hexagon_context * ctx) {
54105410
GGMLHEXAGON_LOG_DEBUG("error: 0x%x, defaulting to cDSP domain", hexagon_error);
54115411
}
54125412
}
5413-
}*/
5413+
}
54145414

54155415
if (0 == use_logical_id) {
54165416
if (!ggmlhexagon_is_valid_domain_id(domain_id, 0)) {

0 commit comments

Comments
 (0)