Update test-model-load-cancel
This commit is contained in:
parent
86c3eab119
commit
d6cf33d6c5
1 changed files with 13 additions and 3 deletions
|
@ -2,11 +2,21 @@
|
|||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
int main(int argc, char *argv[] ) {
|
||||
char * model_path;
|
||||
if (argc > 1) {
|
||||
model_path = argv[1];
|
||||
} else {
|
||||
model_path = getenv("GG_RUN_CTEST_MODELFILE");
|
||||
if (!model_path || strlen(model_path) == 0) {
|
||||
fprintf(stderr, "error: no model file provided\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
const auto * model_path = "models/7B/ggml-model-f16.gguf";
|
||||
auto * file = fopen(model_path, "r");
|
||||
|
||||
if (file == nullptr) {
|
||||
fprintf(stderr, "no model at '%s' found\n", model_path);
|
||||
return EXIT_FAILURE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue