aboutsummaryrefslogtreecommitdiff
path: root/src/kernels_impl.h
diff options
context:
space:
mode:
authorOnur Gündüz <ogunduz@gmail.com>2026-06-20 20:10:56 +0200
committerOnur Gündüz <ogunduz@gmail.com>2026-06-21 05:57:19 +0200
commit6b969d25ce136eaf695222bd1a10bff1ecac0220 (patch)
treec23afb50c28b9deaddae5c6526a74ee11cf2d865 /src/kernels_impl.h
parentd4bdb8dae753462f621507d5fc3582e0e53da35c (diff)
downloadffwd-6b969d25ce136eaf695222bd1a10bff1ecac0220.tar.gz
ffwd-6b969d25ce136eaf695222bd1a10bff1ecac0220.zip
all: split Makefile and reorg library/tools
Diffstat (limited to 'src/kernels_impl.h')
-rw-r--r--src/kernels_impl.h53
1 files changed, 0 insertions, 53 deletions
diff --git a/src/kernels_impl.h b/src/kernels_impl.h
deleted file mode 100644
index 4ee7d74..0000000
--- a/src/kernels_impl.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * embed_kernels_impl.h - internal architecture dispatch for hot kernels
- */
-
-#ifndef EMBED_KERNELS_IMPL_H
-#define EMBED_KERNELS_IMPL_H
-
-#include <stdint.h>
-
-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);
-float embed_dot_f32_generic(const float *a, const float *b, int n);
-void embed_vec_scale_inplace_generic(float *dst, float scale, int n);
-void embed_vec_axpy_inplace_generic(float *dst, const float *src, float alpha, int n);
-void embed_vec_scale_add_generic(float *dst, const float *src, float correction, int n);
-
-#ifdef __ARM_NEON
-void embed_bf16_matvec_fused_neon(
- float *y, const float *x, const uint16_t *W_bf16, const float *bias, int in_dim, int out_dim);
-float embed_dot_f32_neon(const float *a, const float *b, int n);
-void embed_vec_scale_inplace_neon(float *dst, float scale, int n);
-void embed_vec_axpy_inplace_neon(float *dst, const float *src, float alpha, int n);
-void embed_vec_scale_add_neon(float *dst, const float *src, float correction, int n);
-
-#define embed_bf16_matvec_fused_impl embed_bf16_matvec_fused_neon
-#define embed_dot_f32_impl embed_dot_f32_neon
-#define embed_vec_scale_inplace_impl embed_vec_scale_inplace_neon
-#define embed_vec_axpy_inplace_impl embed_vec_axpy_inplace_neon
-#define embed_vec_scale_add_impl embed_vec_scale_add_neon
-
-#elif defined(__AVX2__) && defined(__FMA__)
-void embed_bf16_matvec_fused_avx(
- float *y, const float *x, const uint16_t *W_bf16, const float *bias, int in_dim, int out_dim);
-float embed_dot_f32_avx(const float *a, const float *b, int n);
-void embed_vec_scale_inplace_avx(float *dst, float scale, int n);
-void embed_vec_axpy_inplace_avx(float *dst, const float *src, float alpha, int n);
-void embed_vec_scale_add_avx(float *dst, const float *src, float correction, int n);
-
-#define embed_bf16_matvec_fused_impl embed_bf16_matvec_fused_avx
-#define embed_dot_f32_impl embed_dot_f32_avx
-#define embed_vec_scale_inplace_impl embed_vec_scale_inplace_avx
-#define embed_vec_axpy_inplace_impl embed_vec_axpy_inplace_avx
-#define embed_vec_scale_add_impl embed_vec_scale_add_avx
-
-#else
-#define embed_bf16_matvec_fused_impl embed_bf16_matvec_fused_generic
-#define embed_dot_f32_impl embed_dot_f32_generic
-#define embed_vec_scale_inplace_impl embed_vec_scale_inplace_generic
-#define embed_vec_axpy_inplace_impl embed_vec_axpy_inplace_generic
-#define embed_vec_scale_add_impl embed_vec_scale_add_generic
-#endif
-
-#endif /* EMBED_KERNELS_IMPL_H */