]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
Add -ngl (#11372)
authorEric Curtin <redacted>
Thu, 23 Jan 2025 16:16:18 +0000 (16:16 +0000)
committerGitHub <redacted>
Thu, 23 Jan 2025 16:16:18 +0000 (16:16 +0000)
Most other llama.cpp cli tools accept -ngl with a single dash.

Signed-off-by: Eric Curtin <redacted>
examples/run/run.cpp

index c710d432674a90c532e0eee0d38d5a64783e677e..715f21b5df88d273675cbd4938d0488b3f9aa8f8 100644 (file)
@@ -147,7 +147,8 @@ class Opt {
                 if (handle_option_with_value(argc, argv, i, context_size) == 1) {
                     return 1;
                 }
-            } else if (options_parsing && (strcmp(argv[i], "-n") == 0 || strcmp(argv[i], "--ngl") == 0)) {
+            } else if (options_parsing &&
+                       (strcmp(argv[i], "-n") == 0 || strcmp(argv[i], "-ngl") == 0 || strcmp(argv[i], "--ngl") == 0)) {
                 if (handle_option_with_value(argc, argv, i, ngl) == 1) {
                     return 1;
                 }