← All research notes

The OpenSilicon Project: Superfloat's open-source stack

The OpenSilicon Project is Superfloat's work in the open: the number format, the chip, the compiler, the kernels and the tooling, all developed on GitHub where anyone can read, run and contribute to them. It was kickstarted by Alosh Denny with TinkerHub Foundation, a non-profit community of tinkerers, makers and students.

What is in the OpenSilicon Project?

RepositoryWhat it holds
superfloatThe SFx format definition, the training and benchmark suite, and measured results
superfloat.gpuAtreides: the Q1.15 accelerator RTL, its ISA and the Sky130 hardening flow
superfloat.llvmA Clang/LLVM fork that adds sf16 as a first-class built-in type
superfloat.cudaCUDA and C kernels for training and running language models
superfloat.pythonsf, the Python library: scalars, NumPy-style arrays, PyTorch models and GPU kernels in Superfloat
superfloat.arduinoInteger-only Superfloat inference on the Arduino UNO Q

What does the sf Python library do?

sf lets you write ordinary Python, NumPy-style array code, PyTorch models or GPU-style kernels and get exactly the integer codes the Atreides chip would produce. Every overflow, underflow, divide by zero and invalid input is reported instead of disappearing into the arithmetic, and you choose per event whether to raise, warn or ignore. Arrays placed on the "atreides" device run matmul, dot, sum and elementwise operations there and return a status for each launch. Its documentation lives at docs.superfloat.si.

import sf

h = sf.asarray(inputs,  dtype=sf.sf16, device="atreides")
w = sf.asarray(weights, dtype=sf.sf16, device="atreides")
y = h @ w
y.status   # SFStatus(saturated=0, underflow=0, div0=0, invalid=0, exact=True)

Can Superfloat run on a microcontroller?

Yes. Every SFx scale is a power of two, so a CNN trained on the Superfloat grid runs on integers alone: int8 multiplies, int32 accumulation, and one rounding shift and a clamp per layer. There are no zero points, no per-channel floating-point scales and no requantisation multipliers. superfloat.arduino uses that to build Wildfire Sentinel, an off-grid node on the Arduino UNO Q that detects wildfire smoke and ignitions on the board and never sends an image anywhere.

How can I contribute?

Each repository takes issues and pull requests on GitHub. The format and benchmark work starts in superfloat; the hardware in superfloat.gpu; the software in superfloat.python. To work with the team directly, write to alosh@superfloat.si.