Skip to content

Commit 6b8312e

Browse files
Better error when using both LoRA + GPU layers (#1861)
1 parent 254a7a7 commit 6b8312e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

examples/common.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,14 @@ bool gpt_params_parse(int argc, char ** argv, gpt_params & params) {
412412
gpt_print_usage(argc, argv, default_params);
413413
exit(1);
414414
}
415+
416+
#ifdef GGML_USE_CUBLAS
417+
if (!params.lora_adapter.empty() && params.n_gpu_layers > 0) {
418+
fprintf(stderr, "%s: error: the simultaneous use of LoRAs and GPU acceleration is not supported", __func__);
419+
exit(1);
420+
}
421+
#endif // GGML_USE_CUBLAS
422+
415423
if (escape_prompt) {
416424
process_escapes(params.prompt);
417425
}

0 commit comments

Comments
 (0)