kutacc_af2_layernorm
KuTACC implementation via LayerNorm
Interface Definition
kutacc_export void kutacc_af2_layernorm(__bf16 * data, float* gamma, float* beta, int64_t size, float eps, __bf16 * out);
Parameters
Parameter |
Type |
Description |
Input/Output |
|---|---|---|---|
data |
__bf16 * |
Data source pointer |
Input |
gamma |
float * |
Pointer to the LayerNorm weight parameter |
Input |
beta |
float* |
Pointer to the LayerNorm bias |
Input |
size |
float |
Size of the last dimension of the data source |
Input |
eps |
float |
A very small value used to stabilize the calculation result |
Input |
out |
__bf16 * |
Calculation result |
Output |
Parameter constraints:
The size of the last dimension of data is the same as that of gamma and beta, that is, size = gamma.size, size = beta.size.
Both gamma and beta have only one dimension, while data supports calculations across three dimensions.
Parent topic: GEMM Operators