imernest

I build systems and write down what they actually did.

Featured essay

Measurement, Correctness

Two checks that passed and measured nothing

A benchmark gate that preferred slow runs, and a CI check that would have gone green on zero tests.

Read the essay

18 Sept 2026 · 5 min

Project · active

Weft

A compiler that plans a chunk of a model or media pipeline for one specific machine, and checks every output bit for bit against a slow reference.

C#

Flowchart, top to bottom. A C# fluent frontend builds a Graph through GraphBuilder, which becomes the semantic IR in Weft.Ir. Weft.Analysis computes value ranges, effects and access structure; Weft.Optimizer runs elementwise fusion, region merge and evidence-gated device placement. The result is a Physical Plan, .weftplan.json, which feeds pluggable renderers: IL, C# source, Metal, and a CUDA C artifact. Those reach a thin runtime that binds parameters and runs, a developer doing inspect and A/B, or a remote GPU built off-machine.

Lab · SEP 17 2026

7 ms on a GPU that never went quiet

Machine
RTX 5090 (rented)
Frame time, baseline → candidate
89.43 → 82.16 ms, −7.27 ms (−8.1%), candidate ahead 3 of 3 rounds
Encode time, baseline → candidate
53.57 → 48.22 ms, −5.35 ms (−10.0%), 3 of 3 rounds
Output records bit-identical
80 of 80
im2col, per encode, in the per-kernel GPU trace
2.32 → 1.87 ms

Vectorising the float16 conversions in a CUDA port of SAM 3 took 7.27 ms (8.1%) off a frame, bit-identical, on a rented GPU that failed its idle check on every single run.

By the old assertions it was green before and green after, and the second green tested nothing.

Two checks that passed and measured nothing
  1. 1 Oct 2026
    Compilers & SIMD, Negative results

    Fuse it only if it pays

    Weft used to fuse attention wherever it saw the shape. The engine that replaced it prices the decision on the machine in front of it, and the first thing it did was undo a fusion.

    7 min

  2. 28 Sept 2026
    Compilers & SIMD, Correctness

    Weft now writes its own machine code

    Until September, RyuJIT compiled every kernel Weft produced. Then I needed instructions it couldn't reach.

    7 min

  3. 19 Sept 2026
    Measurement

    Not recorded is not zero

    Why the Money tab in a freight app I built has no monthly total.

    5 min