فهرست منبع

The optimization worked even too well ;)

Piotr Wilkin 3 ماه پیش
والد
کامیت
0a9244acd0
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      ggml/src/ggml-cpu/ops.cpp

+ 1 - 1
ggml/src/ggml-cpu/ops.cpp

@@ -10728,7 +10728,7 @@ void ggml_compute_forward_delta_net_f32(const ggml_compute_params * params, ggml
     GGML_ASSERT(ggml_is_contiguous(src8));
 
     int64_t total_params = n_seqs * H_v * num_chunks;
-    int64_t per_thread = total_params / nth;
+    int64_t per_thread = (total_params % nth == 0) ? total_params / nth : (total_params / nth) + 1;
 
     for (int64_t seq = 0; seq < n_seqs; seq++) {
         for (int64_t head = 0; head < H_v; head++) {