aboutsummaryrefslogtreecommitdiff
path: root/qwen_kernels_impl.h
diff options
context:
space:
mode:
authorOnur Gündüz <ogunduz@gmail.com>2026-06-16 16:27:47 +0200
committerOnur Gündüz <ogunduz@gmail.com>2026-06-16 16:27:47 +0200
commitd1ba1ebc06ef0d62ca932388fae83e6992594719 (patch)
treef962207b779016593258f990348216999a58766a /qwen_kernels_impl.h
parentbe20dfda0f836808dccfc14db244592e41ba28bc (diff)
downloadffwd-d1ba1ebc06ef0d62ca932388fae83e6992594719.tar.gz
ffwd-d1ba1ebc06ef0d62ca932388fae83e6992594719.zip
chore: move sources to src/ with proper names, drop qwen_ prefix
Diffstat (limited to 'qwen_kernels_impl.h')
-rw-r--r--qwen_kernels_impl.h53
1 files changed, 0 insertions, 53 deletions
diff --git a/qwen_kernels_impl.h b/qwen_kernels_impl.h
deleted file mode 100644
index 217f1e8..0000000
--- a/qwen_kernels_impl.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * qwen_kernels_impl.h - internal architecture dispatch for hot kernels
- */
-
-#ifndef QWEN_KERNELS_IMPL_H
-#define QWEN_KERNELS_IMPL_H
-
-#include <stdint.h>
-
-void qwen_bf16_matvec_fused_generic(
- float *y, const float *x, const uint16_t *W_bf16, const float *bias, int in_dim, int out_dim);
-float qwen_dot_f32_generic(const float *a, const float *b, int n);
-void qwen_vec_scale_inplace_generic(float *dst, float scale, int n);
-void qwen_vec_axpy_inplace_generic(float *dst, const float *src, float alpha, int n);
-void qwen_vec_scale_add_generic(float *dst, const float *src, float correction, int n);
-
-#ifdef __ARM_NEON
-void qwen_bf16_matvec_fused_neon(
- float *y, const float *x, const uint16_t *W_bf16, const float *bias, int in_dim, int out_dim);
-float qwen_dot_f32_neon(const float *a, const float *b, int n);
-void qwen_vec_scale_inplace_neon(float *dst, float scale, int n);
-void qwen_vec_axpy_inplace_neon(float *dst, const float *src, float alpha, int n);
-void qwen_vec_scale_add_neon(float *dst, const float *src, float correction, int n);
-
-#define qwen_bf16_matvec_fused_impl qwen_bf16_matvec_fused_neon
-#define qwen_dot_f32_impl qwen_dot_f32_neon
-#define qwen_vec_scale_inplace_impl qwen_vec_scale_inplace_neon
-#define qwen_vec_axpy_inplace_impl qwen_vec_axpy_inplace_neon
-#define qwen_vec_scale_add_impl qwen_vec_scale_add_neon
-
-#elif defined(__AVX2__) && defined(__FMA__)
-void qwen_bf16_matvec_fused_avx(
- float *y, const float *x, const uint16_t *W_bf16, const float *bias, int in_dim, int out_dim);
-float qwen_dot_f32_avx(const float *a, const float *b, int n);
-void qwen_vec_scale_inplace_avx(float *dst, float scale, int n);
-void qwen_vec_axpy_inplace_avx(float *dst, const float *src, float alpha, int n);
-void qwen_vec_scale_add_avx(float *dst, const float *src, float correction, int n);
-
-#define qwen_bf16_matvec_fused_impl qwen_bf16_matvec_fused_avx
-#define qwen_dot_f32_impl qwen_dot_f32_avx
-#define qwen_vec_scale_inplace_impl qwen_vec_scale_inplace_avx
-#define qwen_vec_axpy_inplace_impl qwen_vec_axpy_inplace_avx
-#define qwen_vec_scale_add_impl qwen_vec_scale_add_avx
-
-#else
-#define qwen_bf16_matvec_fused_impl qwen_bf16_matvec_fused_generic
-#define qwen_dot_f32_impl qwen_dot_f32_generic
-#define qwen_vec_scale_inplace_impl qwen_vec_scale_inplace_generic
-#define qwen_vec_axpy_inplace_impl qwen_vec_axpy_inplace_generic
-#define qwen_vec_scale_add_impl qwen_vec_scale_add_generic
-#endif
-
-#endif /* QWEN_KERNELS_IMPL_H */