Examples
Each example under examples/ is a self-contained workload with the same
structure: run_bench.py (or run_bench.sh) builds the plugin and runs the
graph; verify.py / verify.sh checks correctness
(examples/README.md). The example code is not on this site — the links go
to the repository.
Capability matrix
| Example | Plugin language | DAG features | Verify | External deps |
|---|---|---|---|---|
| matrix-compute | Rust (nalgebra, rustfft) | linear chain, shared initialization | verify.sh | none |
| matrix-compute-C | C (FFTW, OpenBLAS) | same topology, C plugin | make validation | libfftw3f, libopenblas |
| matrix-compute-python | Python (NumPy) | same topology, GIL / free-threaded demo | — | uv, NumPy |
| stream-analytics | Rust | conditional branches, grouped barriers, $dep ordering, priorities | verify.py | none |
| mapreduce | C | fan-out / fan-in, variadic barrier | verify.sh | none (GCC) |
| gpu-vectoradd | CUDA C++ | use_workers GPU-thread pinning, host↔device copies | inline | CUDA GPU |
| agent-tuning | — (harness) | 4-arm verifier-gated knob search | per-workload gate | Optuna, claude CLI |
| scheduler-plugin | Rust | pluggable TaskScheduler (FIFO) | — | none |
Running them
All commands run from the repository root with the tomii package installed
(examples/README.md):
python examples/matrix-compute/run_bench.py # Rust plugin
python examples/matrix-compute-C/run_bench.py # C plugin
bash examples/matrix-compute-python/run_bench.sh # Python plugin
python examples/stream-analytics/run_bench.py # conditional branching
python examples/mapreduce/run_bench.py # Map→Reduce wordcount
python examples/gpu-vectoradd/run_bench.py # CUDA (GPU required)
Where each one is covered in this guide
- matrix-compute is the walkthrough in Your first graph and the Rust half of Rust plugins.
- The three matrix-compute variants together are the subject of Polyglot plugins.
- stream-analytics drives Control flow.
- mapreduce and matrix-compute-C appear in C plugins.
- agent-tuning is documented in Agent tuning.
Comparator benchmarks against Taskflow and TBB live under bench/, not
examples/ — see the benchmarks page for
methodology and measured numbers.