From f091a1614c61ab49df424d725f2fb0a54babee66 Mon Sep 17 00:00:00 2001 From: Judd Date: Fri, 26 Jul 2024 15:57:32 +0800 Subject: [PATCH] fix order of parameters usage of `aclrtGetMemInfo` is correct: https://www.hiascend.com/doc_center/source/zh/canncommercial/63RC2/inferapplicationdev/aclcppdevg/aclcppdevg_03_0103.html --- src/llama.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/llama.cpp b/src/llama.cpp index 80235ae19..0199dcb51 100644 --- a/src/llama.cpp +++ b/src/llama.cpp @@ -2907,7 +2907,7 @@ static size_t llama_get_device_memory(const llama_model & model, int device) { #elif defined(GGML_USE_CANN) size_t total; size_t free; - ggml_backend_cann_get_device_memory(device, &total, &free); + ggml_backend_cann_get_device_memory(device, &free, &total); return free; #else return 1;