Skip to content

Commit 7a420e1

Browse files
committed
follow the principle of project and fix typo
1 parent f9e1b9a commit 7a420e1

File tree

2 files changed

+5
-14
lines changed

2 files changed

+5
-14
lines changed

ggml-qnn.cpp

+5-10
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
/*
2-
* MIT license
3-
* Copyright (C) 2024 GGML Authors
4-
* SPDX-License-Identifier: MIT
5-
*
62
* this is implementation of ggml QNN(Qualcomm Neural Network, aka AI Engine Direct) backend
73
*
84
* status:
@@ -959,7 +955,7 @@ static int free_qnn_tensor(Qnn_Tensor_t & tensor) {
959955
QNN_LOG_INFO("it should not happen, pls check");
960956
} else {
961957
//TODO:why crash in here? why pointer changed with mul_mat?
962-
//memory leak after comment above line
958+
//memory leak after comment below line
963959
//free(QNN_TENSOR_GET_DIMENSIONS(tensor));
964960
}
965961

@@ -1464,7 +1460,7 @@ static void ggml_qnn_log_internal(ggml_log_level level, const char * file, const
14641460
#if (defined __ANDROID__) || (defined ANDROID)
14651461
__android_log_print(level, "llamacpp", "%s", s_ggml_qnn_log_internal_buf);
14661462
#else
1467-
printf("%s", buffer); //Qualcomm's QNN could running on Window over ARM
1463+
printf("%s", buffer); //Qualcomm's QNN could running on Windows over ARM(aka WoA)
14681464
#endif
14691465
}
14701466
va_end(args);
@@ -2108,11 +2104,11 @@ int qnn_instance::load_system() {
21082104

21092105
_system_lib_handle = dlopen(system_lib_path.c_str(), RTLD_NOW | RTLD_LOCAL);
21102106
if (nullptr == _system_lib_handle) {
2111-
QNN_LOG_WARN("can not pen QNN library %s, error: %s\n", system_lib_path.c_str(), dlerror());
2107+
QNN_LOG_WARN("can not open QNN library %s, error: %s\n", system_lib_path.c_str(), dlerror());
21122108
return 1;
21132109
}
21142110

2115-
auto *get_providers = reinterpret_cast<_pfn_QnnSystemInterface_getProviders *>(dlsym(
2111+
auto * get_providers = reinterpret_cast<_pfn_QnnSystemInterface_getProviders *>(dlsym(
21162112
_system_lib_handle, "QnnSystemInterface_getProviders"));
21172113
if (nullptr == get_providers) {
21182114
QNN_LOG_WARN("can not load QNN symbol QnnSystemInterface_getProviders: %s\n", dlerror());
@@ -3605,7 +3601,6 @@ bool ggml_qnn_compute_forward(struct ggml_compute_params * params, struct ggml_t
36053601
}
36063602

36073603

3608-
//ok, real show time in Qualcomm's QNN internal
36093604
if (nullptr != func)
36103605
func(tensor->src[0], tensor->src[1], tensor);
36113606
if (nullptr != func_common)
@@ -3845,7 +3840,7 @@ static size_t ggml_backend_qnn_buffer_type_get_alignment(ggml_backend_buffer_typ
38453840
static size_t ggml_backend_qnn_buffer_type_get_max_size(ggml_backend_buffer_type_t buft) {
38463841
GGML_UNUSED(buft);
38473842

3848-
return (38 * 1024 * 1024);
3843+
return (96 * 1024 * 1024);
38493844
}
38503845

38513846

ggml-qnn.h

-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
/*
2-
* MIT license
3-
* Copyright (C) 2024 GGML Authors
4-
* SPDX-License-Identifier: MIT
5-
*
62
* this is implementation of ggml QNN(Qualcomm Nerual Network, aka AI Engine Direct) backend
73
*/
84
#pragma once

0 commit comments

Comments
 (0)