| 9061 | // ggml_compute_forward_leaky |
| 9062 | |
| 9063 | static void ggml_compute_forward_leaky_f32( |
| 9064 | const struct ggml_compute_params * params, |
| 9065 | const struct ggml_tensor * src0, |
| 9066 | struct ggml_tensor * dst) { |
| 9067 | assert(params->ith == 0); |
| 9068 | assert(ggml_are_same_shape(src0, dst)); |
| 9069 | |
| 9070 | if (params->type == GGML_TASK_INIT || params->type == GGML_TASK_FINALIZE) { |
| 9071 | return; |
| 9072 | } |
| 9073 | |
| 9074 | const int n = ggml_nrows(src0); |
| 9075 | const int nc = src0->ne[0]; |
| 9076 | |
| 9077 | assert(dst->nb[0] == sizeof(float)); |
| 9078 | assert(src0->nb[0] == sizeof(float)); |
| 9079 | |
| 9080 | for (int i = 0; i < n; i++) { |
| 9081 | ggml_vec_leaky_f32(nc, |
| 9082 | (float *) ((char *) dst->data + i*( dst->nb[1])), |
| 9083 | (float *) ((char *) src0->data + i*(src0->nb[1]))); |
| 9084 | } |
| 9085 | } |
| 9086 | |
| 9087 | static void ggml_compute_forward_leaky( |
| 9088 | const struct ggml_compute_params * params, |
no test coverage detected