From d502bc7c9d9d6dfb3a09aea404395b666d7b374d Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Tue, 28 Mar 2023 19:51:55 +0300 Subject: [PATCH] tests : free llama context at the end of the test --- CMakeLists.txt | 3 ++- tests/test-tokenizer-0.cpp | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 241be4c..d7b0eba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -129,13 +129,14 @@ if (LLAMA_ALL_WARNINGS) -Wshadow -Wstrict-prototypes -Wpointer-arith + -Wno-unused-function ) set(cxx_flags -Wall -Wextra -Wpedantic -Wcast-qual - -Wdouble-promotion + -Wno-unused-function ) else() # todo : msvc diff --git a/tests/test-tokenizer-0.cpp b/tests/test-tokenizer-0.cpp index 3820553..55b086d 100644 --- a/tests/test-tokenizer-0.cpp +++ b/tests/test-tokenizer-0.cpp @@ -77,5 +77,7 @@ int main(int argc, char **argv) { } } + llama_free(ctx); + return 0; }