Skip to content

Commit f7fb43c

Browse files
authored
Add -ngl (#11372)
Most other llama.cpp cli tools accept -ngl with a single dash. Signed-off-by: Eric Curtin <[email protected]>
1 parent 5845661 commit f7fb43c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/run/run.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,8 @@ class Opt {
147147
if (handle_option_with_value(argc, argv, i, context_size) == 1) {
148148
return 1;
149149
}
150-
} else if (options_parsing && (strcmp(argv[i], "-n") == 0 || strcmp(argv[i], "--ngl") == 0)) {
150+
} else if (options_parsing &&
151+
(strcmp(argv[i], "-n") == 0 || strcmp(argv[i], "-ngl") == 0 || strcmp(argv[i], "--ngl") == 0)) {
151152
if (handle_option_with_value(argc, argv, i, ngl) == 1) {
152153
return 1;
153154
}

0 commit comments

Comments
 (0)