| 3420 | |
| 3421 | struct ggml_tensor * ggml_rms_norm_channels_silu_f16( |
| 3422 | struct ggml_context * ctx, |
| 3423 | struct ggml_tensor * a, |
| 3424 | struct ggml_tensor * gamma, |
| 3425 | float eps) { |
| 3426 | GGML_ASSERT(a->type == GGML_TYPE_F16 || a->type == GGML_TYPE_F32); |
| 3427 | GGML_ASSERT(gamma->type == GGML_TYPE_F32); |
| 3428 | GGML_ASSERT(gamma->ne[0] == a->ne[3]); |
| 3429 | struct ggml_tensor * result = ggml_new_tensor(ctx, GGML_TYPE_F16, GGML_MAX_DIMS, a->ne); |
| 3430 | |
| 3431 | ggml_set_op_params(result, &eps, sizeof(eps)); |
| 3432 | |
| 3433 | result->op = GGML_OP_RMS_NORM_CHANNELS_SILU; |
| 3434 | result->src[0] = a; |
| 3435 | result->src[1] = gamma; |
| 3436 | |
| 3437 | return result; |
| 3438 | } |
| 3439 | |
| 3440 | struct ggml_tensor * ggml_rms_norm_channels_add_bias_silu( |
| 3441 | struct ggml_context * ctx, |
| 3442 | struct ggml_tensor * a, |
| 3443 | struct ggml_tensor * bias, |
| 3444 | struct ggml_tensor * gamma, |
| 3445 | float eps) { |
| 3446 | GGML_ASSERT(bias->ne[0] == a->ne[3]); |
| 3447 | GGML_ASSERT(gamma->ne[0] == a->ne[3]); |
| 3448 | struct ggml_tensor * result = ggml_new_tensor(ctx, GGML_TYPE_F32, GGML_MAX_DIMS, a->ne); |
no test coverage detected