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.
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 | Modeled Physical Mechanism | Literature Array-Core Anchor | Primary Literature Source | Matched Operator Families |
|---|---|---|---|---|
tei-d-baseline | 7 nm–5 nm Digital CMOS CPU/GPU | ~36 pJ / MAC (ALU + local SRAM) | Horowitz (ISSCC 2014) | Branchy control, exact IEEE float |
tei-d-photonic | Mach–Zehnder Interferometer (MZI) mesh | ~30 fJ / MAC (optical pass only) | Shen et al. (2017); Hamerly et al. (2019) | Wide static unitary / dense matmul |
tei-d-in-memory | Tiled 1T1R RRAM analog crossbar | ~2 – 5 fJ / MAC (crossbar core only) | Xiao et al. (CrossSim) | Stationary weight matrices |
tei-d-stochastic | Low-barrier sMTJ magnetic p-bit | ~1 fJ / sample (thermal barrier flip) | Camsari et al. (2017); Borders et al. (2019) | Boltzmann / Ising sampling, MCMC |
tei-d-reversible | Adiabatic / Bennett Toffoli CMOS | ~10^3 x kT ln 2 (~3 aJ ideal floor) | Bennett (1973); Frank adiabatic CMOS | Bijective crypto & lossless permutations |
tei-d-neuromorphic | Event-driven Leaky Integrate-and-Fire (LIF) | ~20 pJ / SOP (synaptic operation) | Davies et al. (Intel Loihi, 2018) | 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).
David Charlot
Open Interface Engineering, Inc. · Signed Provenance · Self-Checked
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 licensing & AI-use disclosure →
Video Summaries, Syndication & Site Reference
Check the primary artifacts or run an independent replication
Inspect signed provenance manifests, rerun our public Apache-2.0 commodity-hardware replication kits, review our November 25, 2026 outside-review errata, or browse primary manuscripts on the Research Hub.