Skip to content

Commit 0a9244a

Browse files
committed
The optimization worked even too well ;)
1 parent 8ddaf25 commit 0a9244a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ggml/src/ggml-cpu/ops.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10728,7 +10728,7 @@ void ggml_compute_forward_delta_net_f32(const ggml_compute_params * params, ggml
1072810728
GGML_ASSERT(ggml_is_contiguous(src8));
1072910729

1073010730
int64_t total_params = n_seqs * H_v * num_chunks;
10731-
int64_t per_thread = total_params / nth;
10731+
int64_t per_thread = (total_params % nth == 0) ? total_params / nth : (total_params / nth) + 1;
1073210732

1073310733
for (int64_t seq = 0; seq < n_seqs; seq++) {
1073410734
for (int64_t head = 0; head < H_v; head++) {

0 commit comments

Comments
 (0)