flowG & TEI Fabric: Typed FunctionGraph IR and Cost-Surface Dispatch Across Physics Dialects
June 10, 2026 Wave II compiler and thermodynamic-fabric specifications uniting ~90 flowg-* Rust crates (dtype-explicit FunctionGraph IR) with TEI Fabric's 6 literature-anchored physics cost surfaces from 36 pJ/MAC CMOS to 1 fJ/sample p-bits.
Temporal & Archival Scope: Era 0 Historical Whitepaper (Originally dated June 10, 2026; verbatim historical summary followed below by dated November 25, 2026 Errata & Related Work Addendum) · Canonical OpenIE Chronicle Entry: https://blog.openie.dev/posts/wp-flowg-tei-fabric-physics-dispatch/
Provenance & Telemetry Hygiene: Signed Provenance · Self-Checked (automated OpenIE internal gates; not externally peer-reviewed) · Energy Class:
est_j(measured_j ⊥ reported_j ⊥ est_j ⊥ unmetered— Verification, Licensing & AI-Use Disclosure · Glossary & Non-Mixing Rules).
Part I: Contemporary Historical Summary (As Written in June 2026)
Historical Source Provenance (Original Date: June 10, 2026): David Jean Charlot, PhD · Open Interface Engineering. Synthesizes the June 2026 flowG compiler IR whitepaper and TEI Fabric (
Apache-2.0) cost-dialect specification (Public repositories:openIE-dev/flow-gandopenIE-dev/tei-fabric).
Convergence: One Typed Graph IR for Languages, Models, and Cost Surfaces
By June 2026, OpenIE maintained three language frontends—lux-lang, math-oriented jmax-lang, and the ~15.5 kloc self-hosted bootstrap of joule-lang—alongside ONNX model pipelines (MobileNetV2, quantized BERT, and a 1.6 GB Stable Diffusion UNet). Maintaining separate lowering stacks for scalar control code and tensor graphs duplicated optimization passes and introduced marshaling overhead wherever application logic met matrix operations.
flowG (~90 modular flowg-* Rust 2024 crates) unified scalar and tensor lowering into a single capability-gated FunctionGraph DAG:
Frontends: joule-lang (~15.5 kloc) · jmax-lang · lux-lang · Real ONNX (MobileNetV2, BERT, 1.6 GB SD UNet)
│
▼
flowG `FunctionGraph` IR (Nodes: `Apply` · `Literal` · `Param` · `CodeBlock` · `CapabilityRef`)
• Object-capability isolation enforced at the VM boundary by `flowg-vm-cap` (no ambient IO/network authority)
• Canonical dtype-explicit fused op names: `fused_<chain>_<f32|f16|bf16>` (bans implicit f16 -> f32 widening)
• Two-method backend trait `OpDispatch`: `claims(op_name)` + `execute(graph_slice, buffers)`
│
├──► Digital Silicon Backends : Apple Metal (runtime MSL) · MPS · Apple AMX (5-15 TFLOPS) ·
│ CUDA · BLAS · WGPU · WASM · Bit-Reference CPU
└──► TEI Fabric Cost Simulator: 258 Periodic Primitives (33 families) -> 6 Physics Dialects
Two design rules in flowG targeted recurring runtime inefficiencies:
- Banning Silent Dtype Widening: Encoding wire precision directly into canonical operator identifiers (
fused_<chain>_<f32|f16|bf16>) prevented backends from silently wideningf16/bf16intermediates tof32across LayerNorm/SiLU fusions (which otherwise doubles memory traffic). - Routing Small Dense Tiles to CPU-Coupled
AMX: On Apple Silicon, dispatching sub-millisecond small-batch matrix tiles toAccelerate/AMX(5–15 TFLOPS) avoided Metal GPU command-buffer submission and wakeup overhead, reducing modeled per-op dispatch energy23–55xrelative to single-tile GPU kernel launch on tiny matrices (<= 128 x 128).
TEI Fabric: Simulating Real ONNX Graphs Across Six Physics Cost Dialects
Above digital CMOS execution, TEI Fabric (258 operator primitives across 33 families) ingested production ONNX graphs—including a 1.6 GB Stable Diffusion UNet—into a software cost-surface partitioner parameterized by published device-physics energy anchors:
- TEI Physics Dialect:
tei-d-baseline· Modeled Physical Mechanism:7 nm–5 nmDigital CMOS CPU/GPU · Literature Array-Core Anchor:~36 pJ / MAC(ALU + local SRAM) · Primary Literature Source: Horowitz (ISSCC 2014) · Matched Operator Families: Branchy control, exact IEEE float - TEI Physics Dialect:
tei-d-photonic· Modeled Physical Mechanism: Mach–Zehnder Interferometer (MZI) mesh · Literature Array-Core Anchor:~30 fJ / MAC(optical pass only) · Primary Literature Source: Shen et al. (2017); Hamerly et al. (2019) · Matched Operator Families: Wide static unitary / dense matmul - TEI Physics Dialect:
tei-d-in-memory· Modeled Physical Mechanism: Tiled1T1RRRAM analog crossbar · Literature Array-Core Anchor:~2 – 5 fJ / MAC(crossbar core only) · Primary Literature Source: Xiao et al. (CrossSim) · Matched Operator Families: Stationary weight matrices - TEI Physics Dialect:
tei-d-stochastic· Modeled Physical Mechanism: Low-barriersMTJmagneticp-bit· Literature Array-Core Anchor:~1 fJ / sample(thermal barrier flip) · Primary Literature Source: Camsari et al. (2017); Borders et al. (2019) · Matched Operator Families: Boltzmann / Ising sampling, MCMC - TEI Physics Dialect:
tei-d-reversible· Modeled Physical Mechanism: Adiabatic / Bennett Toffoli CMOS · Literature Array-Core Anchor:~10^3 x kT ln 2(~3 aJideal floor) · Primary Literature Source: Bennett (1973); Frank adiabatic CMOS · Matched Operator Families: Bijective crypto & lossless permutations - TEI Physics Dialect:
tei-d-neuromorphic· Modeled Physical Mechanism: Event-driven Leaky Integrate-and-Fire (LIF) · Literature Array-Core Anchor:~20 pJ / SOP(synaptic operation) · Primary Literature Source: Davies et al. (Intel Loihi, 2018) · Matched Operator Families: Sparse temporal event streams
The Boundary Conversion Finding: Array fJ vs. ADC/DAC Interface pJ
Partitioning the 1.6 GB Stable Diffusion UNet across heterogeneous dialects surfaced a sobering systems result: while an optical MZI array (~30 fJ/MAC) or RRAM crossbar (2–5 fJ/MAC) is 1,000–10,000x lower than digital CMOS (~36 pJ/MAC) inside the array core, analog-to-digital (ADC/DAC) and electrical-to-optical (E-O-E) conversion at subgraph boundaries consumes 1–50 pJ per converted sample—frequently exceeding the array-core savings by 10–100x unless large contiguous subgraphs remain inside one physical domain.
November 25, 2026 Errata, Related Work, and Evolution Addendum
Methods, Simulator Scope & Licensing Box (est_j)
- Software Cost-Surface Simulation vs. Physical Post-CMOS Hardware (
est_j): WhileflowGexecuted functional workloads on real digital backends (Metal,AMX/Accelerate,CUDA,WGPU,WASM,CPU), all five non-CMOStei-d-*dialects (photonic,in-memory,stochastic,reversible,neuromorphic) are analytical cost-surface models (est_j) parameterized from peer-reviewed device papers, not physical photonic, RRAM, orsMTJhardware owned or fabricated by OpenIE. - Denominator Scope on the
23–55xAMX Dispatch Figure: The23–55xmodeled energy ratio compares CPU-residentAMXexecution (denominator) against unbatched single-kernel Metal GPU command-queue wakeup and synchronization (numerator) on small sub-millisecond tiles; on large sustained matrix batches where GPU launch cost amortizes, discrete/integrated GPU shaders outperform CPUAMXthroughput. - Artifact & Licensing Status: Core graph IR and cost-surface crates are publicly available under Apache-2.0 at
openIE-dev/flow-gandopenIE-dev/tei-fabric(andjoule-langatopenIE-dev/joule-lang); companion experimental language frontends (lux-lang,jmax-lang) remain internal repositories.
Chronological Evolution Within OpenIE Research
- Zero-ADC Digital Lookup on Commodity CMOS/FPGAs (Downward LUT6 Compilation & 64-Codon LUT6): Because TEI Fabric’s simulator showed that
ADC/DACconversion wipes out small-subgraph analog PIM gains, our late-2026 hardware experiments focused on purely digital zero-multiplyLUT6boolean and{-1, 0, +1}ternary operators, which stay inside standard CMOS/FPGA logic with zeroADC/DACboundary tax (125–176 nJinline DC board shuntmeasured_jon Jetson Thor). - Metered Digital Substrate Profiling (Eco-Compute & The Eco-Stack): Carried
flowG’s explicit precision naming andflowg-vm-capcapability isolation forward while anchoring digital backend comparisons onreported_jchip counters andmeasured_jshunts.
Related Work & External References
- Lattner, C., et al. (2021). MLIR: Scaling Compiler Infrastructure for Domain Specific Computation. CGO 2021 — direct inspiration for multi-dialect IR design and progressive lowering.
- Chen, T., et al. (2018). TVM: An Automated End-to-End Optimizing Compiler for Deep Learning. OSDI 2018; OpenXLA (2020); Ragan-Kelley, J., et al. (2013). Halide. PLDI 2013.
- Miller, M. S. (2006). Robust Composition: Towards a Unified Approach to Access Control and Concurrency Control. PhD Dissertation, Johns Hopkins University — theoretical foundation for object-capability security (
CapabilityRef/flowg-vm-cap). - Horowitz, M. (2014). Computing’s Energy Problem (and What We Can Do About It). ISSCC 2014 — CMOS arithmetic and SRAM/DRAM pJ anchor.
- Shen, Y., Harris, N. C., Skirlo, S., et al. (2017). Deep Learning with Coherent Nanophotonic Circuits. Nature Photonics, 11, 441–446; Hamerly, R., Bernstein, L., Sludds, A., Soljačić, M., & Englund, D. (2019). Large-Scale Optical Neural Networks Based on Photoelectric Multiplication. Physical Review X, 9(2), 021032.
- Xiao, T. P., Bennett, C. H., Feinberg, B., Agarwal, S., & Marinella, M. J. (2020). Analog Architectures for Neural Network Acceleration Based on Non-Volatile Memory (CrossSim). Applied Physics Reviews, 7, 031301 — prominent analysis of RRAM array energy vs. peripheral
ADCbottlenecks. - Camsari, K. Y., Faria, R., Sutton, B. M., & Datta, S. (2017). Stochastic p-Bits for Invertible Logic. Physical Review X, 7(3), 031014; Borders, W. A., Pervaiz, A. Z., Fukami, S., Camsari, K. Y., Ohno, H., & Datta, S. (2019). Integer Factorization Using Stochastic Magnetic Tunnel Junctions. Nature, 573, 390–393.
- Davies, M., Srinivasa, N., Lin, T.-H., et al. (2018). Loihi: A Neuromorphic Manycore Processor with On-Chip Learning. IEEE Micro, 38(1), 82–99.
Changelog (2026-11-25)
- Separated Part I (June 10, 2026 contemporary specification summary) from Part II (November 25, 2026 simulator-scope disclosures, licensing provenance, and related work).
- Explicitly distinguished functional digital backends (
Metal,AMX,CUDA,WGPU,WASM) from analytical cost-surface simulation (est_j) for the post-CMOS dialects, and specified the unbatched small-tile denominator on the23–55xAMXvs. GPU wakeup ratio. - Added citations to MLIR (2021), TVM (2018), OpenXLA, Halide (2013), Miller object capabilities (2006), Horowitz (2014), Shen et al. (2017), Hamerly et al. (2019), Xiao et al. CrossSim (2020), Camsari et al. (2017), Borders et al. (2019), and Intel Loihi (Davies et al., 2018).
Canonical Provenance, Primary Artifacts & Independent Replication
- Canonical OpenIE Chronicle Entry: https://blog.openie.dev/posts/wp-flowg-tei-fabric-physics-dispatch/
- Public Code / Replication Harness: https://github.com/openIE-dev/flow-g
- Signed Provenance · Self-Checked Disclosure & Licensing: Public open-source specifications and Rust crates at openIE-dev/flow-g and openIE-dev/tei-fabric under Apache-2.0; companion frontend workspaces lux-lang and jmax-lang are internal repositories. Full details at https://blog.openie.dev/verification/ and https://blog.openie.dev/glossary/.