Skip to content

Commit 074ae26

Browse files
author
zhouwg
committed
ggml-qnn: fix a minior issue in ggmlqnn_create_general_tensor()
1 parent 08d4dbc commit 074ae26

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ggml/src/ggml-qnn/ggml-qnn.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,7 @@ Qnn_Tensor_t * ggmlqnn_create_general_tensor(const ggml_tensor * tensor, const c
947947
char tensor_name[GGML_MAX_NAME] = {};
948948

949949
//ensure the tensor name is unique
950-
if (nullptr != name) {
950+
if (nullptr == name) {
951951
snprintf(tensor_name, GGML_MAX_NAME, "tensor_%-8d", get_idx());
952952
} else {
953953
snprintf(tensor_name, GGML_MAX_NAME, "tensor_%s%-8d", name, get_idx());
@@ -1857,6 +1857,12 @@ int qnn_instance::qnn_init(const QnnSaver_Config_t ** saver_config) {
18571857
if (0 != set_high_performance_mode()) {
18581858
GGMLQNN_LOG_WARN("set HTP high performance mode failure");
18591859
}
1860+
1861+
if (enable_qnn_rpc()) {
1862+
GGMLQNN_LOG_INFO("NPU RPC feature enabled");
1863+
} else {
1864+
GGMLQNN_LOG_INFO("NPU RPC feature disabled");
1865+
}
18601866
}
18611867

18621868
GGMLQNN_LOG_DEBUG("leave qni_init\n");

0 commit comments

Comments
 (0)