MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / main

Function main

subprojects/llama.cpp/tests/test-backend-sampler.cpp:1136–1165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1134}
1135
1136int main(int argc, char ** argv) {
1137 test_args args = parse_cli(argc, argv);
1138
1139 if (args.model.empty()) {
1140 args.model = get_model_or_exit(1, argv);
1141 }
1142
1143 {
1144 std::ifstream file(args.model);
1145 if (!file.is_open()) {
1146 fprintf(stderr, "no model '%s' found\n", args.model.c_str());
1147 return EXIT_FAILURE;
1148 }
1149 }
1150
1151 fprintf(stderr, "using '%s'\n", args.model.c_str());
1152
1153 llama_backend_init();
1154
1155 test_params params = {
1156 /*.model =*/ load_model(args),
1157 };
1158
1159 const std::vector<const backend_test_case *> tests = collect_tests_to_run(args.test);
1160 if (!tests.empty()) {
1161 run_tests(tests, params);
1162 }
1163
1164 return 0;
1165}

Callers

nothing calls this directly

Calls 7

parse_cliFunction · 0.85
get_model_or_exitFunction · 0.85
llama_backend_initFunction · 0.85
collect_tests_to_runFunction · 0.85
run_testsFunction · 0.85
load_modelFunction · 0.70
emptyMethod · 0.65

Tested by

no test coverage detected