MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / ggml_vec_gelu_f32

Function ggml_vec_gelu_f32

ggml.c:1422–1429  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1420
1421#ifdef GGML_GELU_FP16
1422inline static void ggml_vec_gelu_f32(const int n, float * y, const float * x) {
1423 uint16_t t;
1424 for (int i = 0; i < n; ++i) {
1425 ggml_fp16_t fp16 = GGML_FP32_TO_FP16(x[i]);
1426 memcpy(&t, &fp16, sizeof(uint16_t));
1427 y[i] = GGML_FP16_TO_FP32(ggml_table_gelu_f16[t]);
1428 }
1429}
1430#else
1431inline static void ggml_vec_gelu_f32(const int n, float * y, const float * x) {
1432 for (int i = 0; i < n; ++i) {

Callers 1

Calls 1

ggml_gelu_f32Function · 0.70

Tested by

no test coverage detected