tests: export-graph-ops: exit gracefully when called w/o arguments (#25619)
Fixes a segfault when `test-export-graph-ops` is called without any arguments.
This commit is contained in:
@@ -152,6 +152,10 @@ int main(int argc, char ** argv) {
|
|||||||
init_result = common_init_from_params(params);
|
init_result = common_init_from_params(params);
|
||||||
|
|
||||||
ctx = init_result->context();
|
ctx = init_result->context();
|
||||||
|
if (!ctx) {
|
||||||
|
LOG_ERR("failed to initialize params\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
#ifdef LLAMA_HF_FETCH
|
#ifdef LLAMA_HF_FETCH
|
||||||
auto [hf_repo, hf_quant] = common_download_split_repo_tag(params.model.hf_repo);
|
auto [hf_repo, hf_quant] = common_download_split_repo_tag(params.model.hf_repo);
|
||||||
|
|||||||
Reference in New Issue
Block a user