diff --git a/ggml.c b/ggml.c index a2b3a44e4..534b68939 100644 --- a/ggml.c +++ b/ggml.c @@ -16394,7 +16394,7 @@ static int ggml_get_n_tasks(struct ggml_tensor * node, int n_threads) { } break; case GGML_OP_GET_ROWS: { - n_tasks = n_threads; + n_tasks = MIN(n_threads, ggml_nelements(node->src[1])); } break; case GGML_OP_SCALE: case GGML_OP_SET: