]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
ggml : fix multi-threaded clamp_f32 (#11824)
authorRichard <redacted>
Wed, 12 Feb 2025 13:57:33 +0000 (13:57 +0000)
committerGitHub <redacted>
Wed, 12 Feb 2025 13:57:33 +0000 (15:57 +0200)
* Bug fix for clamp_f32

When using tensors larger than 1d clamp operation does not work due to the restriction of returning if ith is not 0.

* Bug fix for clamp_f32

* Bug fix for clamp_f32

ggml/src/ggml-cpu/ggml-cpu.c

index fdb430a43cc216607a62245ea04d9f4a588f7ace..fcbb5c233f0b1eafd814ad7aa0942ee57a613142 100644 (file)
@@ -9074,10 +9074,6 @@ static void ggml_compute_forward_clamp_f32(
 
     const struct ggml_tensor * src0 = dst->src[0];
 
-    if (params->ith != 0) {
-        return;
-    }
-
     float min;
     float max;
     memcpy(&min, (float *) dst->op_params + 0, sizeof(float));