diff --git a/ggml-qnn.cpp b/ggml-qnn.cpp index 4eeb048f2ef9b2..918e2fb4a59277 100644 --- a/ggml-qnn.cpp +++ b/ggml-qnn.cpp @@ -1,8 +1,4 @@ /* - * MIT license - * Copyright (C) 2024 GGML Authors - * SPDX-License-Identifier: MIT - * * this is implementation of ggml QNN(Qualcomm Neural Network, aka AI Engine Direct) backend * * status: @@ -959,7 +955,7 @@ static int free_qnn_tensor(Qnn_Tensor_t & tensor) { QNN_LOG_INFO("it should not happen, pls check"); } else { //TODO:why crash in here? why pointer changed with mul_mat? - //memory leak after comment above line + //memory leak after comment below line //free(QNN_TENSOR_GET_DIMENSIONS(tensor)); } @@ -1464,7 +1460,7 @@ static void ggml_qnn_log_internal(ggml_log_level level, const char * file, const #if (defined __ANDROID__) || (defined ANDROID) __android_log_print(level, "llamacpp", "%s", s_ggml_qnn_log_internal_buf); #else - printf("%s", buffer); //Qualcomm's QNN could running on Window over ARM + printf("%s", buffer); //Qualcomm's QNN could running on Windows over ARM(aka WoA) #endif } va_end(args); @@ -2108,11 +2104,11 @@ int qnn_instance::load_system() { _system_lib_handle = dlopen(system_lib_path.c_str(), RTLD_NOW | RTLD_LOCAL); if (nullptr == _system_lib_handle) { - QNN_LOG_WARN("can not pen QNN library %s, error: %s\n", system_lib_path.c_str(), dlerror()); + QNN_LOG_WARN("can not open QNN library %s, error: %s\n", system_lib_path.c_str(), dlerror()); return 1; } - auto *get_providers = reinterpret_cast<_pfn_QnnSystemInterface_getProviders *>(dlsym( + auto * get_providers = reinterpret_cast<_pfn_QnnSystemInterface_getProviders *>(dlsym( _system_lib_handle, "QnnSystemInterface_getProviders")); if (nullptr == get_providers) { 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 } - //ok, real show time in Qualcomm's QNN internal if (nullptr != func) func(tensor->src[0], tensor->src[1], tensor); if (nullptr != func_common) @@ -3845,7 +3840,7 @@ static size_t ggml_backend_qnn_buffer_type_get_alignment(ggml_backend_buffer_typ static size_t ggml_backend_qnn_buffer_type_get_max_size(ggml_backend_buffer_type_t buft) { GGML_UNUSED(buft); - return (38 * 1024 * 1024); + return (96 * 1024 * 1024); } diff --git a/ggml-qnn.h b/ggml-qnn.h index dae4b476134299..75602fafd30159 100644 --- a/ggml-qnn.h +++ b/ggml-qnn.h @@ -1,8 +1,4 @@ /* - * MIT license - * Copyright (C) 2024 GGML Authors - * SPDX-License-Identifier: MIT - * * this is implementation of ggml QNN(Qualcomm Nerual Network, aka AI Engine Direct) backend */ #pragma once