Skip to content

Commit

Permalink
gpu: if no active gpu is set, assume first one
Browse files Browse the repository at this point in the history
  • Loading branch information
flightlessmango committed Nov 17, 2024
1 parent c8a08b9 commit a109f0b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/gpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,11 @@ class GPUS {
}
}
}

return nullptr;
// if no GPU is marked as active, just set it to the first one
if (available_gpus.size() > 0)
return available_gpus.front();
else
return nullptr;
}

void update_throttling() {
Expand Down

0 comments on commit a109f0b

Please sign in to comment.