ReLU activation kernels with SIMD (SSE/AVX/AVX512) More...
#include <math.h>#include <stddef.h>#include <stdint.h>Go to the source code of this file.
Functions | |
| void | relu2_backward (const float *input, const float *d_output, float *d_input, size_t n) |
| void | relu2_forward (const float *input, float *output, size_t n) |
| void | relu_backward (const float *input, const float *d_output, float *d_input, size_t n) |
| void | relu_forward (const float *input, float *output, size_t n) |
| void | relu_forward_inplace (float *data, size_t n) |
ReLU activation kernels with SIMD (SSE/AVX/AVX512)
After changes: make test && make llamacpp-parity-full
ReLU: y = max(0, x)
Definition in file relu_kernels.c.
| void relu2_backward | ( | const float * | input, |
| const float * | d_output, | ||
| float * | d_input, | ||
| size_t | n | ||
| ) |
Definition at line 147 of file relu_kernels.c.
References mask.
| void relu2_forward | ( | const float * | input, |
| float * | output, | ||
| size_t | n | ||
| ) |
Definition at line 120 of file relu_kernels.c.
| void relu_backward | ( | const float * | input, |
| const float * | d_output, | ||
| float * | d_input, | ||
| size_t | n | ||
| ) |
Definition at line 84 of file relu_kernels.c.
References mask.
| void relu_forward | ( | const float * | input, |
| float * | output, | ||
| size_t | n | ||
| ) |
Definition at line 26 of file relu_kernels.c.
| void relu_forward_inplace | ( | float * | data, |
| size_t | n | ||
| ) |
Definition at line 54 of file relu_kernels.c.