← Back to C-Kernel-Engine Docs Doxygen Source Documentation
 
Loading...
Searching...
No Matches
quantize_row_q8_k_avx.c
Go to the documentation of this file.
1/**
2 * @file quantize_row_q8_k_avx.c
3 * @brief AVX entrypoint for exact Q8_K row quantization
4 *
5 * CK-ENGINE KERNEL RULES:
6 * =======================
7 * 1. NO malloc/free - memory via bump allocator, pointers passed in
8 * 2. NO OpenMP - parallelization at orchestrator/codegen layer
9 * 3. API must define: inputs, outputs, workspace, and memory layouts
10 * 4. Pure computation - deterministic, no side effects
11 *
12 * After changes: make test && make llamacpp-parity-full
13 */
14
15#include "ckernel_quant.h"
16
17void quantize_row_q8_k_sse(const float *x, void *vy, int k);
18void quantize_row_q8_k_ref(const float *x, void *vy, int k);
19
20void quantize_row_q8_k_avx(const float *x, void *vy, int k) {
21 /* Reuse the parity-clean SIMD implementation until a wider AVX variant is
22 * worth maintaining separately. */
23#if defined(__SSE4_1__)
24 quantize_row_q8_k_sse(x, vy, k);
25#else
26 quantize_row_q8_k_ref(x, vy, k);
27#endif
28}
Quantization block structures for weight-only quantization.
void quantize_row_q8_k_avx(const float *x, void *vy, int k)
void quantize_row_q8_k_sse(const float *x, void *vy, int k)
void quantize_row_q8_k_ref(const float *x, void *vy, int k)