One tensor program. Two real chips. Bit-exact.

TinyCompiler turns C = relu(A @ B) intotiny-gpu SIMT kernels and into atiny-tpu tile schedule. Both run on the real simulator and the real RTL, and both match numpy exactly.

Read the docs

C = relu(A @ B) compiled to both chips. The array is tiny-tpu's real RTL, cycle by cycle, from the Compiler Explorer.

What is checked, on every commit

Optimizing the tiny-gpu kernel (8×8 matmul + relu, measured)

levelinstructionscyclesglobal loads
-O0 naive7320101088
-O1 licm + strength reduction5208 (−29%)91024
-O2 tiling, unrolling, folding3288 (−55%)3576 (−47%)

Per-pass numbers, and why -O2 is not simply better, are in the architecture notes.

TinyCompiler is the fourth project in a series withtiny-gpu,tiny-tpu and tiny-cpu.