code wiki / (root) / nx_simd_dot_bench.nx

nx_simd_dot_bench.nx

buildroot/runtime/nx_simd_dot_bench.nx

4247 B125 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind benchtopic simd
docsdependenciesstructsconstsfunctions

about

nx_simd_dot_bench.nx -- x86 integer-SIMD dot (vpmaddwd via __i16x16_madd) vs scalar: verify + speedup. Unblocks the perf-exceed: __i16x16_madd(acc_i32x8, a_i16x16, b_i16x16) does 16 int16 mul-adds per call via one vpmaddwd. A 4096-wide dot = 256 madd calls + one horizontal sum. Verified bit-exact vs scalar + timed. This is the reusable SIMD integer-dot primitive for the Q4_K GEMM (q*col per sub-block). license_tier: ORIGINAL

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_tier.nx nx_strconv.nx nx_clock.nx nx_simd_dot_bench.nx

imports: nx_syscalls.nxnx_tier.nxnx_strconv.nxnx_clock.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap db_pack4 db_hsum nx_clock_monotonic_ns sys_mmap ↻ sys_clock_gettime_mono sys_openat_wr db_emit sys_mmap ↻ nx_strconv_format_i64 sys_write sys_close

structs

none

consts

none

functions

12func db_pack4(a: i64, b: i64, c: i64, d: i64) -> i64
called by 1: main
17func db_hsum(acc: *i64) -> i64
called by 1: main
32func db_emit(fd: i64, key: *u8, kl: i64, v: i64) -> i64
46func main() -> i64