mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2026-09-08 13:59:03 +02:00
1173700b9c
This commit adds the printing of the ggml version and commit to the test-cmake example. The motivation is just to be able to quickly verify that the correct version of ggml is being used. Example output: ```console test-cmake] llama.cpp version: 0.4.0-dev, build: 10837 (5202104b5) [test-cmake] ggml version: 0.23.0, commit:5202104b5[test-cmake] Initializing backend... ... ```
14 lines
454 B
C++
14 lines
454 B
C++
#include "llama.h"
|
|
#include <cstdio>
|
|
|
|
int main(void) {
|
|
printf("[test-cmake] llama.cpp version: %s, build: %d (%s)\n",
|
|
llama_version(), LLAMA_BUILD_NUMBER, LLAMA_BUILD_COMMIT);
|
|
printf("[test-cmake] ggml version: %s, commit: %s\n", ggml_version(), ggml_commit());
|
|
printf("[test-cmake] Initializing backend...\n");
|
|
llama_backend_init();
|
|
printf("[test-cmake] Backend initialized.\n");
|
|
llama_backend_free();
|
|
return 0;
|
|
}
|