code wiki / (root) / nx_native_matmul_bench.nx

nx_native_matmul_bench.nx

buildroot/runtime/nx_native_matmul_bench.nx

1616 B57 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind benchtopic native
docsdependenciesstructsconstsfunctions

about

nx_native_matmul_bench.nx -- matmul-shaped native micro-bench. Most LLM-relevant micro-bench in the paired suite. llama.cpp's transformer forward is dominated by GEMM kernels; this measures how Nishi's native codegen handles the same access pattern at a tractable size. Workload: C = A * B for 128x128 i64 matrices. ~2M multiply-adds. Returns (C[0][0] & 0xFF) as exit code. Compares against gcc -O0 (no opt) and gcc -O2 (auto-vectorized matmul) on the same machine for paired comparison.

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_native_matmul_bench.nx

imports: nx_syscalls.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

structs

none

consts

none

functions

16func main() -> i64
calls 1: sys_mmap