| 1448 | |
| 1449 | #ifdef GGML_GELU_QUICK_FP16 |
| 1450 | inline static void ggml_vec_gelu_quick_f32(const int n, float * y, const float * x) { |
| 1451 | uint16_t t; |
| 1452 | for (int i = 0; i < n; ++i) { |
| 1453 | ggml_fp16_t fp16 = GGML_FP32_TO_FP16(x[i]); |
| 1454 | memcpy(&t, &fp16, sizeof(uint16_t)); |
| 1455 | y[i] = GGML_FP16_TO_FP32(ggml_table_gelu_quick_f16[t]); |
| 1456 | } |
| 1457 | } |
| 1458 | #else |
| 1459 | inline static void ggml_vec_gelu_quick_f32(const int n, float * y, const float * x) { |
| 1460 | for (int i = 0; i < n; ++i) { |
no test coverage detected