Projects / active

Weft

A .NET 10 compiler that lowers a semantic graph of physical plans to four backends, under two floating-point contracts.

Status
active
Languages
C#
Current release
—
Latest
—
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.

How it works

Semantic graph -> .weftplan.json -> IlRenderer / CSharpSourceRenderer / MslRenderer / CudaRenderer, benchmarked against a reference oracle under two named postures.

Weft compiles a semantic graph (the warp) through a defined plan intermediate (.weftplan.json) to four renderers: an IL renderer, a C# source renderer, an MSL renderer and a CUDA renderer. Its distinctive property is that it is measured against a differential oracle under two named contracts — Strict, which forbids float reassociation and fixes the accumulator count at one, and Inference, which permits sanctioned divergence. Divergence from the Strict oracle under Inference is the contract's own definition rather than a defect, and it is recorded rather than gated.

  • Two contracts, not one configuration: Strict (AllowFloatReassociation=false, AccumulatorCount=1) and Inference.
  • A stated measurement bar of (n, posture, env, reducer) — a ratio without it is not a claim.
  • An A/A control that returned 19.99% variance before a fix and 0.06–0.21% after.

Releases