flow-g
A typed FunctionGraph IR for heterogeneous inference.
flowG is the compiler IR + runtime substrate behind the openIE-dev ecosystem. It takes typed function graphs and dispatches them across CPU, Apple-silicon Metal, WGPU, AMX, and the OpDispatch backend family — with picojoule-budgeted per-op energy measurement built in.
This is the public release surface. Source is private at openIE-dev/flow-g-core — 99 crates spanning the IR, codegen passes, OpDispatch leaves, model runtimes, and benchmarks.
Status
Release binaries + examples + documentation. flowG is free to use software, not an open-source project. See LICENSE for the Business Source License 1.1 terms — converts to Apache-2.0 four years after each binary's release date.
What you get
| Binary | Purpose |
|---|---|
flowg |
The CLI: compile graphs, lower to backends, run + benchmark |
flowg-serve |
HTTP serving for compiled graphs (model runtimes, kernels) |
flowg-bench |
Per-op + per-graph benchmarking with energy receipts |
Plus a Rust library, flowg, for embedding.
Install
# via cargo
# via cargo-binstall (prebuilt binary)
# direct download
|
Platform support:
| Platform | Status |
|---|---|
| macOS arm64 (Apple Silicon) | shipping |
| macOS x86_64 | shipping |
| Linux x86_64 (musl) | shipping |
| Linux aarch64 (musl) | shipping |
| Windows x86_64 | shipping |
Hello, flow-g
# compile a graph from .fg to executable
# lower to WGSL for WebGPU
# run with energy receipts
|
See examples/ for runnable programs spanning every backend.
What makes flow-g different
- Typed FunctionGraph IR — not an AST, not a SSA, not a tensor program. Functions are first-class graph nodes with typed signatures, designed for energy-cost-aware dispatch.
- OpDispatch backend — kernels are addressed by
(op, dtype, layout, target)tuples. The runtime picks the lowest-joule kernel that matches. - Heterogeneous by default — CPU + Metal + WGPU + AMX share the same IR. No "GPU port" — just dispatch the same graph at a different target.
- Energy substrate — every op has measured picojoule cost on Apple Silicon (IOReport-backed), NVML for Linux NVIDIA, RAPL for x86_64 Linux. Energy receipts are first-class output.
- 70+ model runtimes — Llama family, Qwen family, Mamba2, Bamba, Jamba, Hunyuan, Gemma 4, LFM2 family, Whisper, Moonshine, V-JEPA, and more — all using the same IR.
How it fits
flowG is the substrate. The openIE-dev language family compiles to it:
- Lux — general-purpose reactive language → flowG
- JMax — math-native language → flowG
- Joule — energy-aware self-hosted language → flowG
And the substrate is metered by JouleDB — the energy-metered HDC database that records inference receipts.
Documentation
- Getting started → https://openie-dev.github.io/flow-g
- Examples →
examples/ - API reference → https://docs.rs/flowg
- Source mirror →
openIE-dev/flow-g-core
Releases
GitHub Releases — tagged versions with prebuilt binaries for every supported platform, plus a SHA-256 checksums file per release.
Community
- Discussions — Q&A, design discussion
- Issues — bug reports
- Security: see SECURITY.md
License
- Binaries — Business Source License 1.1; see LICENSE. Free for non-commercial use, internal use by orgs under $1M revenue, security/academic research. Converts to Apache-2.0 four years after each release.
- Documentation — CC-BY-4.0
- Examples — Apache-2.0