mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-11-04 09:32:00 +00:00 
			
		
		
		
	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 <foldl@boxvest.com>
This commit is contained in:
		@@ -2905,7 +2905,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;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user