Skip to content

Commit 7f9fd31

Browse files
committed
Warn user if imatrix will get overwritten
1 parent ea6a543 commit 7f9fd31

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

examples/cli/main.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,14 @@ void parse_args(int argc, const char** argv, SDParams& params) {
663663
}
664664
}
665665

666+
if (params.imatrix_out.size() > 0 && file_exists(params.imatrix_out)) {
667+
// imatrix file already exists
668+
if (std::find(params.imatrix_in.begin(), params.imatrix_in.end(), params.imatrix_out) == params.imatrix_in.end()) {
669+
printf("\n IMPORTANT: imatrix file %s already exists, but wasn't found in the imatrix inputs.\n", params.imatrix_out.c_str());
670+
printf("%s will get overwritten!\n", params.imatrix_out.c_str());
671+
}
672+
}
673+
666674
if (invalid_arg) {
667675
fprintf(stderr, "error: invalid parameter for argument: %s\n", arg.c_str());
668676
print_usage(argc, argv);

0 commit comments

Comments
 (0)