aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Gäßler <johannesg@5d6.de>2023-06-15 19:06:46 +0200
committerGitHub <noreply@github.com>2023-06-15 19:06:46 +0200
commit6b8312e7979b852f6b6ac9d29cd51fda16c17948 (patch)
tree98697c401f8a1740362da45983d44c48d921e20a
parent254a7a7a5ff4c874ff8488f1f5cbdd7e9c89d682 (diff)
Better error when using both LoRA + GPU layers (#1861)
-rw-r--r--examples/common.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/common.cpp b/examples/common.cpp
index dc69e53..b47f062 100644
--- a/examples/common.cpp
+++ b/examples/common.cpp
@@ -412,6 +412,14 @@ bool gpt_params_parse(int argc, char ** argv, gpt_params & params) {
gpt_print_usage(argc, argv, default_params);
exit(1);
}
+
+#ifdef GGML_USE_CUBLAS
+ if (!params.lora_adapter.empty() && params.n_gpu_layers > 0) {
+ fprintf(stderr, "%s: error: the simultaneous use of LoRAs and GPU acceleration is not supported", __func__);
+ exit(1);
+ }
+#endif // GGML_USE_CUBLAS
+
if (escape_prompt) {
process_escapes(params.prompt);
}