mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-11-04 09:32:00 +00:00 
			
		
		
		
	ggml : add version function to get lib version (ggml/1286)
* ggml : add version function to get lib version
This commit adds a function `ggml_version()` to the ggml library that
returns the version of the library as a string.
The motivation for this is that it can be useful to be able to
programmatically check the version of the ggml library being used.
Usage:
```c
printf("GGML version: %s\n", ggml_version());
```
Output:
```console
GGML version: 0.0.2219
```
* ggml : add ggml_commit()
---------
Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
			
			
This commit is contained in:
		
				
					committed by
					
						
						Georgi Gerganov
					
				
			
			
				
	
			
			
			
						parent
						
							f3ed38d793
						
					
				
				
					commit
					c46944aa25
				
			@@ -473,6 +473,14 @@ bool ggml_guid_matches(ggml_guid_t guid_a, ggml_guid_t guid_b) {
 | 
			
		||||
    return memcmp(guid_a, guid_b, sizeof(ggml_guid)) == 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const char * ggml_version(void) {
 | 
			
		||||
    return GGML_VERSION;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const char * ggml_commit(void) {
 | 
			
		||||
    return GGML_COMMIT;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// timing
 | 
			
		||||
//
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user