mirror of
https://github.com/ikawrakow/ik_llama.cpp.git
synced 2026-05-01 03:41:53 +00:00
Fix assert when --max-gpu is less than available GPUs
This commit is contained in:
@@ -274,7 +274,7 @@ static std::vector<int> create_split(int nr, int granularity, const std::vector<
|
|||||||
}
|
}
|
||||||
while (sum > nchunk) {
|
while (sum > nchunk) {
|
||||||
last_split = 0;
|
last_split = 0;
|
||||||
float best_err = 0;
|
float best_err = -INFINITY;
|
||||||
int ibest = -1;
|
int ibest = -1;
|
||||||
for (int i = 0; i < (int)splits.size(); ++i) {
|
for (int i = 0; i < (int)splits.size(); ++i) {
|
||||||
if (result[i] > 0) {
|
if (result[i] > 0) {
|
||||||
@@ -294,7 +294,7 @@ static std::vector<int> create_split(int nr, int granularity, const std::vector<
|
|||||||
}
|
}
|
||||||
while (sum < nchunk) {
|
while (sum < nchunk) {
|
||||||
last_split = 0;
|
last_split = 0;
|
||||||
float best_err = 0;
|
float best_err = -INFINITY;
|
||||||
int ibest = -1;
|
int ibest = -1;
|
||||||
for (int i = 0; i < (int)splits.size(); ++i) {
|
for (int i = 0; i < (int)splits.size(); ++i) {
|
||||||
float p = splits[i] - last_split;
|
float p = splits[i] - last_split;
|
||||||
|
|||||||
Reference in New Issue
Block a user