Skip to content

Commit fde9013

Browse files
unamedkrclaude
andcommitted
Fix x86_64 build: move macros and helpers outside #ifdef __ARM_NEON
TQ_MATMUL_Q2_OR_1BIT macros, profiling struct, and FP16 helpers were inside #ifdef __ARM_NEON guard. On x86_64 (Ubuntu CI), these were excluded, causing undefined reference linker errors. Moved macros before NEON guard, added #endif after arm_neon.h include. All platform-independent code is now outside NEON conditionals. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5043747 commit fde9013

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/engine/tq_transformer.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@
2727
#include <stdio.h>
2828
#include <time.h>
2929

30-
#ifdef __ARM_NEON
31-
#include <arm_neon.h>
32-
3330
/* Unified Q2/1-bit matmul dispatch.
3431
* When model->use_1bit_weights, Q2 fields contain sign bits + norms,
3532
* dispatched to tq_matmul_1bit (FP32 input required).
@@ -49,6 +46,9 @@
4946
else \
5047
tq_matmul_q2((out), (x_fp32), (qs), (scales), (rows), (cols)); \
5148
} while(0)
49+
50+
#ifdef __ARM_NEON
51+
#include <arm_neon.h>
5252
#endif
5353

5454
/* ============================================================

0 commit comments

Comments
 (0)