diff options
author | Justina Cho <justcho5@gmail.com> | 2024-05-01 14:44:26 -0700 |
---|---|---|
committer | Georgi Gerganov <ggerganov@gmail.com> | 2024-05-11 15:38:34 +0300 |
commit | f5ef34e428f3886544590ecb2d532e4d333c114c (patch) | |
tree | 55fccc222e344916be2574642656f05649be3344 /ggml.h | |
parent | ef0d5e3ec9f99003af3ff326384816c02850ea3f (diff) |
feat: implemented sigmoid function (ggml/806)
* added sigmoid function
* implemented metal kernel for sigmoid
* implemented cuda kernel for sigmoid
* added sigmoid unary op and incremented count
Diffstat (limited to 'ggml.h')
-rw-r--r-- | ggml.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -519,6 +519,7 @@ extern "C" { GGML_UNARY_OP_TANH, GGML_UNARY_OP_ELU, GGML_UNARY_OP_RELU, + GGML_UNARY_OP_SIGMOID, GGML_UNARY_OP_GELU, GGML_UNARY_OP_GELU_QUICK, GGML_UNARY_OP_SILU, @@ -1073,6 +1074,14 @@ extern "C" { struct ggml_context * ctx, struct ggml_tensor * a); + GGML_API struct ggml_tensor * ggml_sigmoid( + struct ggml_context * ctx, + struct ggml_tensor * a); + + GGML_API struct ggml_tensor * ggml_sigmoid_inplace( + struct ggml_context * ctx, + struct ggml_tensor * a); + GGML_API struct ggml_tensor * ggml_gelu( struct ggml_context * ctx, struct ggml_tensor * a); |