Richard commited on
Commit
1b1d6a8
·
1 Parent(s): 05b9e78

ggml : fix multi-threaded clamp_f32 (llama/11824)

Browse files

* 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

Files changed (1) hide show
  1. ggml/src/ggml-cpu/ggml-cpu.c +0 -4
ggml/src/ggml-cpu/ggml-cpu.c CHANGED
@@ -9074,10 +9074,6 @@ static void ggml_compute_forward_clamp_f32(
9074
 
9075
  const struct ggml_tensor * src0 = dst->src[0];
9076
 
9077
- if (params->ith != 0) {
9078
- return;
9079
- }
9080
-
9081
  float min;
9082
  float max;
9083
  memcpy(&min, (float *) dst->op_params + 0, sizeof(float));
 
9074
 
9075
  const struct ggml_tensor * src0 = dst->src[0];
9076
 
 
 
 
 
9077
  float min;
9078
  float max;
9079
  memcpy(&min, (float *) dst->op_params + 0, sizeof(float));