From 6b8312e7979b852f6b6ac9d29cd51fda16c17948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20G=C3=A4=C3=9Fler?= Date: Thu, 15 Jun 2023 19:06:46 +0200 Subject: [PATCH] Better error when using both LoRA + GPU layers (#1861) --- examples/common.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/examples/common.cpp b/examples/common.cpp index dc69e5373..b47f06273 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); }