Skip to content

Commit 5d826ae

Browse files
committed
Warn user if imatrix will get overwritten
1 parent 353e7ee commit 5d826ae

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

examples/cli/main.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,14 @@ void parse_args(int argc, const char** argv, SDParams& params) {
753753
}
754754
}
755755

756+
if (params.imatrix_out.size() > 0 && file_exists(params.imatrix_out)) {
757+
// imatrix file already exists
758+
if (std::find(params.imatrix_in.begin(), params.imatrix_in.end(), params.imatrix_out) == params.imatrix_in.end()) {
759+
printf("\n IMPORTANT: imatrix file %s already exists, but wasn't found in the imatrix inputs.\n", params.imatrix_out.c_str());
760+
printf("%s will get overwritten!\n", params.imatrix_out.c_str());
761+
}
762+
}
763+
756764
if (invalid_arg) {
757765
fprintf(stderr, "error: invalid parameter for argument: %s\n", arg.c_str());
758766
print_usage(argc, argv);

0 commit comments

Comments
 (0)