| 7978 | // ggml_compute_forward_sqrt |
| 7979 | |
| 7980 | static void ggml_compute_forward_sqrt_f32( |
| 7981 | const struct ggml_compute_params * params, |
| 7982 | const struct ggml_tensor * src0, |
| 7983 | struct ggml_tensor * dst) { |
| 7984 | assert(params->ith == 0); |
| 7985 | assert(ggml_are_same_shape(src0, dst)); |
| 7986 | |
| 7987 | if (params->type == GGML_TASK_INIT || params->type == GGML_TASK_FINALIZE) { |
| 7988 | return; |
| 7989 | } |
| 7990 | |
| 7991 | const int n = ggml_nrows(src0); |
| 7992 | const int nc = src0->ne[0]; |
| 7993 | |
| 7994 | assert( dst->nb[0] == sizeof(float)); |
| 7995 | assert(src0->nb[0] == sizeof(float)); |
| 7996 | |
| 7997 | for (int i = 0; i < n; i++) { |
| 7998 | ggml_vec_sqrt_f32(nc, |
| 7999 | (float *) ((char *) dst->data + i*( dst->nb[1])), |
| 8000 | (float *) ((char *) src0->data + i*(src0->nb[1]))); |
| 8001 | } |
| 8002 | } |
| 8003 | |
| 8004 | static void ggml_compute_forward_sqrt( |
| 8005 | const struct ggml_compute_params * params, |
no test coverage detected