@@ -6,11 +6,23 @@ BUILD_TARGETS = \
66
77# Binaries only useful for tests
88TEST_TARGETS = \
9- tests/test-llama-grammar tests/test-grammar-parser tests/test-double-float tests/test-grad0 tests/test-opt \
10- tests/test-quantize-fns tests/test-quantize-perf tests/test-sampling tests/test-tokenizer-0-llama \
11- tests/test-tokenizer-0-falcon tests/test-tokenizer-1-llama tests/test-tokenizer-1-bpe tests/test-rope \
12- tests/test-backend-ops tests/test-model-load-cancel tests/test-autorelease \
13- tests/test-json-schema-to-grammar tests/test-grammar-integration
9+ tests/test-autorelease \
10+ tests/test-backend-ops \
11+ tests/test-double-float \
12+ tests/test-grad0 \
13+ tests/test-grammar-integration \
14+ tests/test-grammar-parser \
15+ tests/test-json-schema-to-grammar \
16+ tests/test-llama-grammar \
17+ tests/test-model-load-cancel \
18+ tests/test-opt \
19+ tests/test-quantize-fns \
20+ tests/test-quantize-perf \
21+ tests/test-rope \
22+ tests/test-sampling \
23+ tests/test-tokenizer-0 \
24+ tests/test-tokenizer-1-bpe \
25+ tests/test-tokenizer-1-spm
1426
1527# Code coverage output files
1628COV_TARGETS = *.gcno tests/*.gcno *.gcda tests/*.gcda *.gcov tests/*.gcov lcov-report gcovr-report
@@ -60,11 +72,17 @@ default: $(BUILD_TARGETS)
6072test : $(TEST_TARGETS )
6173 @failures=0; \
6274 for test_target in $( TEST_TARGETS) ; do \
63- if [ " $$ test_target" = " tests/test-tokenizer-0-llama" ]; then \
64- ./$$ test_target $(CURDIR ) /models/ggml-vocab-llama.gguf; \
65- elif [ " $$ test_target" = " tests/test-tokenizer-0-falcon" ]; then \
75+ if [ " $$ test_target" = " tests/test-tokenizer-0" ]; then \
76+ ./$$ test_target $(CURDIR ) /models/ggml-vocab-llama-spm.gguf; \
77+ ./$$ test_target $(CURDIR ) /models/ggml-vocab-llama-bpe.gguf; \
78+ ./$$ test_target $(CURDIR ) /models/ggml-vocab-phi-3.gguf; \
6679 ./$$ test_target $(CURDIR ) /models/ggml-vocab-falcon.gguf; \
67- elif [ " $$ test_target" = " tests/test-tokenizer-1-llama" ]; then \
80+ ./$$ test_target $(CURDIR ) /models/ggml-vocab-deepseek-coder.gguf; \
81+ ./$$ test_target $(CURDIR ) /models/ggml-vocab-deepseek-llm.gguf; \
82+ ./$$ test_target $(CURDIR ) /models/ggml-vocab-bert-bge.gguf; \
83+ ./$$ test_target $(CURDIR ) /models/ggml-vocab-starcoder.gguf; \
84+ ./$$ test_target $(CURDIR ) /models/ggml-vocab-gpt-2.gguf; \
85+ elif [ " $$ test_target" = " tests/test-tokenizer-1-spm" ]; then \
6886 continue ; \
6987 elif [ " $$ test_target" = " tests/test-tokenizer-1-bpe" ]; then \
7088 continue ; \
@@ -982,19 +1000,15 @@ tests/test-sampling: tests/test-sampling.cpp ggml.o llama.o $(OBJS)
9821000 $(CXX ) $(CXXFLAGS ) -c $< -o $(call GET_OBJ_FILE, $< )
9831001 $(CXX ) $(CXXFLAGS ) $(filter-out % .h $< ,$^ ) $(call GET_OBJ_FILE, $< ) -o $@ $(LDFLAGS )
9841002
985- tests/test-tokenizer-0-falcon : tests/test-tokenizer-0-falcon.cpp ggml.o llama.o $(COMMON_DEPS ) console.o $(OBJS )
986- $(CXX ) $(CXXFLAGS ) -c $< -o $(call GET_OBJ_FILE, $< )
987- $(CXX ) $(CXXFLAGS ) $(filter-out % .h $< ,$^ ) $(call GET_OBJ_FILE, $< ) -o $@ $(LDFLAGS )
988-
989- tests/test-tokenizer-0-llama : tests/test-tokenizer-0-llama.cpp ggml.o llama.o $(COMMON_DEPS ) console.o $(OBJS )
1003+ tests/test-tokenizer-0 : tests/test-tokenizer-0.cpp ggml.o llama.o $(COMMON_DEPS ) console.o $(OBJS )
9901004 $(CXX ) $(CXXFLAGS ) -c $< -o $(call GET_OBJ_FILE, $< )
9911005 $(CXX ) $(CXXFLAGS ) $(filter-out % .h $< ,$^ ) $(call GET_OBJ_FILE, $< ) -o $@ $(LDFLAGS )
9921006
9931007tests/test-tokenizer-1-bpe : tests/test-tokenizer-1-bpe.cpp ggml.o llama.o $(COMMON_DEPS ) console.o $(OBJS )
9941008 $(CXX ) $(CXXFLAGS ) -c $< -o $(call GET_OBJ_FILE, $< )
9951009 $(CXX ) $(CXXFLAGS ) $(filter-out % .h $< ,$^ ) $(call GET_OBJ_FILE, $< ) -o $@ $(LDFLAGS )
9961010
997- tests/test-tokenizer-1-llama : tests/test-tokenizer-1-llama .cpp ggml.o llama.o $(COMMON_DEPS ) console.o $(OBJS )
1011+ tests/test-tokenizer-1-spm : tests/test-tokenizer-1-spm .cpp ggml.o llama.o $(COMMON_DEPS ) console.o $(OBJS )
9981012 $(CXX ) $(CXXFLAGS ) -c $< -o $(call GET_OBJ_FILE, $< )
9991013 $(CXX ) $(CXXFLAGS ) $(filter-out % .h $< ,$^ ) $(call GET_OBJ_FILE, $< ) -o $@ $(LDFLAGS )
10001014
0 commit comments