code wiki / (root) / nx_f32x8_dot_bench.nx

nx_f32x8_dot_bench.nx

buildroot/runtime/nx_f32x8_dot_bench.nx

3617 B100 linesdepth 5pulls 11 transitivereach 0 importersview sourcekind benchtopic f32x8
docsdependenciesstructsconstsfunctions

about

nx_f32x8_dot_bench.nx -- x86 f32 SIMD dot (__f32x8_dot, AVX vmulps) vs scalar: verify + speedup. Complements the integer vpmaddwd win: the f32 side (DiT projections + linear attention) accelerates via __f32x8_dot (8 f32 mul-adds per call). A 4096-wide dot = 512 __f32x8_dot chunk calls. Verified vs scalar f32 + timed. f32 packed as 4-byte f32 in memory (the intrinsic's layout). license_tier: ORIGINAL

dependencies 8 imports · 0 importers

nx_syscalls.nx nx_tier.nx nx_le.nx nx_strconv.nx nx_f32.nx nx_f32_div.nx nx_f32_cvt.nx nx_clock.nx nx_f32x8_dot_bench.nx

imports: nx_syscalls.nxnx_tier.nxnx_le.nxnx_strconv.nxnx_f32.nxnx_f32_div.nxnx_f32_cvt.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 nx_i32_to_f32 nx_le_write_u32 nx_f32_div nx_f32_classify nx_f32_exp_field nx_f32_mant_field nx_f32_sign nx_f32_mant_field ↻ nx_f32_exp_field ↻ nx_f32_add nx_f32_classify ↻ nx_f32_sign ↻ nx_f32_mant_field ↻ nx_f32_exp_field ↻ nx_f32_mul nx_f32_classify ↻ nx_f32_sign ↻ nx_f32_mant_field ↻ nx_f32_exp_field ↻ nx_le_read_u32 nx_f32_sub nx_f32_add ↻ nx_f32_neg nx_clock_monotonic_ns sys_mmap ↻ sys_clock_gettime_mono sys_openat_wr fb_emit sys_mmap ↻ nx_strconv_format_i64 sys_write sys_close

structs

none

consts

15const K_MAGIC_4096: i64 = 4096
16const K_MAGIC_20000: i64 = 20000

functions

18func fb_emit(fd: i64, key: *u8, kl: i64, v: i64) -> i64
32func main() -> i64