Update tests

experiment/model-compression
Georgi Gerganov 2 years ago
parent 37110d693e
commit b43b36e006

@ -1,7 +1,7 @@
set(TEST_TARGET test-main-tiny) set(TEST_TARGET test-main-tiny)
add_test(NAME ${TEST_TARGET} add_test(NAME ${TEST_TARGET}
COMMAND $<TARGET_FILE:main> COMMAND $<TARGET_FILE:main>
-m ${PROJECT_SOURCE_DIR}/models/for-tests-ggml-tiny.bin -m ${PROJECT_SOURCE_DIR}/models/for-tests-ggml-tiny.bin -l fr
-f ${PROJECT_SOURCE_DIR}/samples/jfk.wav) -f ${PROJECT_SOURCE_DIR}/samples/jfk.wav)
set_tests_properties(${TEST_TARGET} PROPERTIES LABELS "tiny;gh") set_tests_properties(${TEST_TARGET} PROPERTIES LABELS "tiny;gh")
@ -15,21 +15,21 @@ set_tests_properties(${TEST_TARGET} PROPERTIES LABELS "tiny;en;gh")
set(TEST_TARGET test-main-base) set(TEST_TARGET test-main-base)
add_test(NAME ${TEST_TARGET} add_test(NAME ${TEST_TARGET}
COMMAND $<TARGET_FILE:main> COMMAND $<TARGET_FILE:main>
-m ${PROJECT_SOURCE_DIR}/models/for-tests-ggml-base.bin -m ${PROJECT_SOURCE_DIR}/models/for-tests-ggml-base.bin -l fr
-f ${PROJECT_SOURCE_DIR}/samples/jfk.wav) -f ${PROJECT_SOURCE_DIR}/samples/jfk.wav)
set_tests_properties(${TEST_TARGET} PROPERTIES LABELS "base;gh") set_tests_properties(${TEST_TARGET} PROPERTIES LABELS "base")
set(TEST_TARGET test-main-base.en) set(TEST_TARGET test-main-base.en)
add_test(NAME ${TEST_TARGET} add_test(NAME ${TEST_TARGET}
COMMAND $<TARGET_FILE:main> COMMAND $<TARGET_FILE:main>
-m ${PROJECT_SOURCE_DIR}/models/for-tests-ggml-base.en.bin -m ${PROJECT_SOURCE_DIR}/models/for-tests-ggml-base.en.bin
-f ${PROJECT_SOURCE_DIR}/samples/jfk.wav) -f ${PROJECT_SOURCE_DIR}/samples/jfk.wav)
set_tests_properties(${TEST_TARGET} PROPERTIES LABELS "base;en;gh") set_tests_properties(${TEST_TARGET} PROPERTIES LABELS "base;en")
set(TEST_TARGET test-main-small) set(TEST_TARGET test-main-small)
add_test(NAME ${TEST_TARGET} add_test(NAME ${TEST_TARGET}
COMMAND $<TARGET_FILE:main> COMMAND $<TARGET_FILE:main>
-m ${PROJECT_SOURCE_DIR}/models/for-tests-ggml-small.bin -m ${PROJECT_SOURCE_DIR}/models/for-tests-ggml-small.bin -l fr
-f ${PROJECT_SOURCE_DIR}/samples/jfk.wav) -f ${PROJECT_SOURCE_DIR}/samples/jfk.wav)
set_tests_properties(${TEST_TARGET} PROPERTIES LABELS "small") set_tests_properties(${TEST_TARGET} PROPERTIES LABELS "small")
@ -43,7 +43,7 @@ set_tests_properties(${TEST_TARGET} PROPERTIES LABELS "small;en")
set(TEST_TARGET test-main-medium) set(TEST_TARGET test-main-medium)
add_test(NAME ${TEST_TARGET} add_test(NAME ${TEST_TARGET}
COMMAND $<TARGET_FILE:main> COMMAND $<TARGET_FILE:main>
-m ${PROJECT_SOURCE_DIR}/models/for-tests-ggml-medium.bin -m ${PROJECT_SOURCE_DIR}/models/for-tests-ggml-medium.bin -l fr
-f ${PROJECT_SOURCE_DIR}/samples/jfk.wav) -f ${PROJECT_SOURCE_DIR}/samples/jfk.wav)
set_tests_properties(${TEST_TARGET} PROPERTIES LABELS "medium") set_tests_properties(${TEST_TARGET} PROPERTIES LABELS "medium")

@ -1012,7 +1012,7 @@ bool whisper_model_load(const std::string & fname, whisper_context & wctx) {
if (n_loaded == 0) { if (n_loaded == 0) {
printf("%s: WARN no tensors loaded from model file - assuming empty model for testing\n", __func__); printf("%s: WARN no tensors loaded from model file - assuming empty model for testing\n", __func__);
} else if (n_loaded != model.tensors.size()) { } else if (n_loaded != (int) model.tensors.size()) {
fprintf(stderr, "%s: ERROR not all tensors loaded from model file - expected %zu, got %d\n", __func__, model.tensors.size(), n_loaded); fprintf(stderr, "%s: ERROR not all tensors loaded from model file - expected %zu, got %d\n", __func__, model.tensors.size(), n_loaded);
return false; return false;
} }

Loading…
Cancel
Save