Browse Source

tests : free llama context at the end of the test

Georgi Gerganov 2 năm trước cách đây
mục cha
commit
d502bc7c9d
2 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 2 1
      CMakeLists.txt
  2. 2 0
      tests/test-tokenizer-0.cpp

+ 2 - 1
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

+ 2 - 0
tests/test-tokenizer-0.cpp

@@ -77,5 +77,7 @@ int main(int argc, char **argv) {
         }
     }
 
+    llama_free(ctx);
+
     return 0;
 }