From: Richard Date: Wed, 12 Feb 2025 13:57:33 +0000 (+0000) Subject: ggml : fix multi-threaded clamp_f32 (llama/11824) X-Git-Tag: upstream/1.7.4+203~78 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=d597f83e1aa43d62556cc52b46ab6ffb819373e9;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp ggml : fix multi-threaded clamp_f32 (llama/11824) * 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 --- diff --git a/ggml/src/ggml-cpu/ggml-cpu.c b/ggml/src/ggml-cpu/ggml-cpu.c index fdb430a4..fcbb5c23 100644 --- a/ggml/src/ggml-cpu/ggml-cpu.c +++ b/ggml/src/ggml-cpu/ggml-cpu.c @@ -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));