diff options
Diffstat (limited to '')
| -rw-r--r-- | src/kernels_generic.c (renamed from qwen_kernels_generic.c) | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/qwen_kernels_generic.c b/src/kernels_generic.c index 149dfe0..7e85298 100644 --- a/qwen_kernels_generic.c +++ b/src/kernels_generic.c @@ -1,12 +1,12 @@ /* - * qwen_kernels_generic.c - architecture-generic hot kernels + * embed_kernels_generic.c - architecture-generic hot kernels */ -#include "qwen_kernels_impl.h" +#include "kernels_impl.h" #include <string.h> -void qwen_bf16_matvec_fused_generic( +void embed_bf16_matvec_fused_generic( float *y, const float *x, const uint16_t *W_bf16, const float *bias, int in_dim, int out_dim) { for (int o = 0; o < out_dim; o++) { const uint16_t *w_row = W_bf16 + (size_t)o * in_dim; @@ -21,24 +21,24 @@ void qwen_bf16_matvec_fused_generic( } } -float qwen_dot_f32_generic(const float *a, const float *b, int n) { +float embed_dot_f32_generic(const float *a, const float *b, int n) { float sum = 0.0f; for (int i = 0; i < n; i++) sum += a[i] * b[i]; return sum; } -void qwen_vec_scale_inplace_generic(float *dst, float scale, int n) { +void embed_vec_scale_inplace_generic(float *dst, float scale, int n) { for (int i = 0; i < n; i++) dst[i] *= scale; } -void qwen_vec_axpy_inplace_generic(float *dst, const float *src, float alpha, int n) { +void embed_vec_axpy_inplace_generic(float *dst, const float *src, float alpha, int n) { for (int i = 0; i < n; i++) dst[i] += alpha * src[i]; } -void qwen_vec_scale_add_generic(float *dst, const float *src, float correction, int n) { +void embed_vec_scale_add_generic(float *dst, const float *src, float correction, int n) { for (int i = 0; i < n; i++) dst[i] = dst[i] * correction + src[i]; } |
