Skip to content

Commit f10e67d

Browse files
committed
ggml: softmax op: update the n_task calculation
1 parent fe54033 commit f10e67d

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
@@ -16597,7 +16597,7 @@ static int ggml_get_n_tasks(struct ggml_tensor * node, int n_threads) {
1659716597
} break;
1659816598
case GGML_OP_SOFT_MAX:
1659916599
{
16600-
n_tasks = MIN(MIN(4, n_threads), ggml_nrows(node->src[0]));
16600+
n_tasks = MIN(n_threads, MAX(ggml_nrows(node->src[0]) - 1, 1));
1660116601
} break;
1660216602
case GGML_OP_CONV_TRANSPOSE_1D:
1660316603
{

0 commit comments

Comments
 (0)