aboutsummaryrefslogtreecommitdiff
path: root/libffwd/impl.h
diff options
context:
space:
mode:
authorOnur Gündüz <ogunduz@gmail.com>2026-09-29 13:05:44 +0200
committerOnur Gündüz <ogunduz@gmail.com>2026-09-29 13:05:44 +0200
commitcf7d8169ec12cb3adf90d4ff78b3257e74985302 (patch)
treef666589acfd68e76bbde4e74eead44ae7819d0bb /libffwd/impl.h
parent91871be6ece9317c5d49353f6474583e7e28168d (diff)
downloadlangdet-cf7d8169ec12cb3adf90d4ff78b3257e74985302.tar.gz
langdet-cf7d8169ec12cb3adf90d4ff78b3257e74985302.zip
Remove unused model families and inference paths
Diffstat (limited to 'libffwd/impl.h')
-rw-r--r--libffwd/impl.h28
1 files changed, 1 insertions, 27 deletions
diff --git a/libffwd/impl.h b/libffwd/impl.h
index 2149cf2..f216518 100644
--- a/libffwd/impl.h
+++ b/libffwd/impl.h
@@ -1,27 +1,10 @@
-/*
- * Internal architecture dispatch for hot kernels.
- *
- * Small vector primitives (dot product, scale, axpy, scale-add, scaled
- * multiply) are static inline here so they fold into the caller's loop.
- * For example, an RMSNorm or attention row has no call overhead, and the
- * compiler can keep the row in registers across reduction and write-back.
- *
- * Generic scalar versions stay out of line in generic.c. They are the reference
- * for kernel tests and the fallback when no SIMD path is available.
- *
- * bf16_matvec_fused is a large full matrix-vector product, called once per
- * output tile rather than inside a tight loop, so it stays out of line.
- */
+/* Inline vector operations keep attention rows in registers across reductions. */
#ifndef KERNELS_IMPL_H
#define KERNELS_IMPL_H
#include <stdint.h>
-/* Scalar references (generic.c): the kernel tests compare the SIMD results
- * against these, and the no-SIMD build dispatches to them directly. */
-void bf16_matvec_fused_generic(
- float *y, const float *x, const uint16_t *W_bf16, const float *bias, int in_dim, int out_dim);
float dot_f32_generic(const float *a, const float *b, int n);
void vec_scale_inplace_generic(float *dst, float scale, int n);
void vec_axpy_inplace_generic(float *dst, const float *src, float alpha, int n);
@@ -31,10 +14,6 @@ void vec_scale_add_generic(float *dst, const float *src, float correction, int n
# include <arm_neon.h>
-void bf16_matvec_fused_neon(
- float *y, const float *x, const uint16_t *W_bf16, const float *bias, int in_dim, int out_dim);
-# define bf16_matvec_fused_impl bf16_matvec_fused_neon
-
static inline float dot_f32_impl(const float *a, const float *b, int n) {
int i = 0;
float32x4_t acc0 = vdupq_n_f32(0.0f);
@@ -100,10 +79,6 @@ static inline void vec_scale_add_impl(float *dst, const float *src, float correc
# include <immintrin.h>
-void bf16_matvec_fused_avx(
- float *y, const float *x, const uint16_t *W_bf16, const float *bias, int in_dim, int out_dim);
-# define bf16_matvec_fused_impl bf16_matvec_fused_avx
-
static inline float dot_f32_impl(const float *a, const float *b, int n) {
# if defined(__AVX512F__)
int i = 0;
@@ -269,7 +244,6 @@ static inline void vec_scale_add_impl(float *dst, const float *src, float correc
#else /* no SIMD path: dispatch to the scalar references */
-# define bf16_matvec_fused_impl bf16_matvec_fused_generic
# define dot_f32_impl dot_f32_generic
# define vec_scale_inplace_impl vec_scale_inplace_generic
# define vec_axpy_inplace_impl vec_axpy_inplace_generic