From: Johannes Gäßler Date: Thu, 15 Jun 2023 17:06:46 +0000 (+0200) Subject: Better error when using both LoRA + GPU layers (#1861) X-Git-Tag: gguf-v0.4.0~635 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=6b8312e7979b852f6b6ac9d29cd51fda16c17948;p=pkg%2Fggml%2Fsources%2Fllama.cpp Better error when using both LoRA + GPU layers (#1861) --- diff --git a/examples/common.cpp b/examples/common.cpp index dc69e537..b47f0627 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); }