From a1cf044dd145271c6d32c7f9bfd23f7a2f9717e1 Mon Sep 17 00:00:00 2001 From: Judd Date: Fri, 26 Jul 2024 16:38:12 +0800 Subject: [PATCH] llama : fix order of parameters (#8706) usage of `aclrtGetMemInfo` is correct: https://www.hiascend.com/doc_center/source/zh/canncommercial/63RC2/inferapplicationdev/aclcppdevg/aclcppdevg_03_0103.html Co-authored-by: Judd --- src/llama.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/llama.cpp b/src/llama.cpp index 7e2acf480..f6e4f25e5 100644 --- a/src/llama.cpp +++ b/src/llama.cpp @@ -2906,7 +2906,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;