Skip to content

Commit 940c01e

Browse files
committed
ggml : limit get_rows threads to the number of rows
1 parent 16e12ab commit 940c01e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ggml.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16394,7 +16394,7 @@ static int ggml_get_n_tasks(struct ggml_tensor * node, int n_threads) {
1639416394
} break;
1639516395
case GGML_OP_GET_ROWS:
1639616396
{
16397-
n_tasks = n_threads;
16397+
n_tasks = MIN(n_threads, ggml_nelements(node->src[1]));
1639816398
} break;
1639916399
case GGML_OP_SCALE:
1640016400
case GGML_OP_SET:

0 commit comments

Comments
 (0)