Phase 7e-a (partial) — Math dot surface + simd_dot pure Li¶
Summary¶
Tier 1 simd_dot Li source uses a @ b on fixed array[40000, float] tiles (no __li_simd_*). Prelude dot(a, b) aliases the same lowering; ArrayDotF64 codegen remains scalar (LLVM may autovec at -O3).
Agent continuation¶
- Read
docs/release-notes/2026-05-21-7eb-matmul-pure-li.mdand merge stack #138 → #139 → this PR. - Run
./li-tests/run_all.sh(162 pass) andpython3 benchmarks/harness/bench.pyverify forsimd_dot. - Then fix explicit f64×4
ArrayDotF64SIMD loads (insert-element path; vectorloadsegfaulted on LLVM 22), or 7e-c docs gallery. - Blocked on
@vectorizeddecorator lowering to MIR (7d elaboration).
Changed¶
| Path | What |
|---|---|
benchmarks/tier1_micro/simd_dot/li/main.li | 800× dot_tile_f64(rep) with return a @ b |
benchmarks/harness/bench.py | simd_dot flops_per_run=8e7 (800 tiles) |
compiler/types/typecheck.cpp | dot() builtin; skip check_call_args for prelude |
compiler/mir/lower.cpp | lower_float_array_dot_f64, dot() call |
compiler/types/prelude.cpp | dot in prelude proc set |
li-tests/math_linalg/dot_float_arrays.li | @ vs dot() |
Not changed¶
- Explicit SIMD MIR for
ArrayDotF64(vector load caused runtime SIGSEGV; reverted). sum(a * b)element-wise (no array*yet).matmul_blockedpure Li.@vectorizedon loops.
Breaking¶
N/A.
Security¶
N/A.
Performance¶
simd_dot pure-Li ~0.9× native wall on smoke run (800×40k @); not parity-gated. Native column still uses C dot_core.c.
Downstream¶
- Master plan 7e-a checkbox: bench source clean; SIMD MIR explicit lanes follow-up.