Skip to content

Commit b4024af

Browse files
authored
llama : skip main_gpu validation when no devices are available (#23405)
1 parent 1a2dea2 commit b4024af

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/llama.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ static bool llama_prepare_model_devices(const llama_model_params & params, llama
249249
}
250250

251251
// if using single GPU mode, remove all except the main GPU
252-
if (params.split_mode == LLAMA_SPLIT_MODE_NONE) {
252+
if (params.split_mode == LLAMA_SPLIT_MODE_NONE && !model->devices.empty()) {
253253
if (params.main_gpu < 0) {
254254
model->devices.clear();
255255
} else {

0 commit comments

Comments
 (0)