Utility Functions#
Standalone utility functions for common mathematical operations.
Function Reference#
-
void aocl_gemm_gelu_tanh_f32(const md_t n, float *x, const md_t incx)#
Performs GELU activation (tanh approximation) on a float vector.
- Parameters:
n – [in] Number of elements in the vector.
x – [inout] Pointer to the vector.
incx – [in] Stride between consecutive elements in the vector. aocl_gemm_gelu_tanh_f32
-
void aocl_gemm_gelu_erf_f32(const md_t n, float *x, const md_t incx)#
Performs GELU activation (erf approximation) on a float vector.
- Parameters:
n – [in] Number of elements in the vector.
x – [inout] Pointer to the vector.
incx – [in] Stride between consecutive elements in the vector. aocl_gemm_gelu_erf_f32
-
void aocl_gemm_softmax_f32(const md_t n, float *x, const md_t incx)#
Performs softmax activation on a float vector.
- Parameters:
n – [in] Number of elements in the vector.
x – [inout] Pointer to the vector.
incx – [in] Stride between consecutive elements in the vector. aocl_gemm_softmax_f32
See Also
Element-wise Operations - Element-wise operations
../post_ops/index - Post-operations framework
GEMM Operations - GEMM operations