Guides
Execution model
TypeNN owns the Tensor graph and its meaning. TypeShade owns kernel compilation and program execution.
Tensor calls build a deferred graph
Operations such as matmul(), add(), and relu() do not compute. Each one records a node that holds a TypeShade kernel function, the input Tensors, the scalars the kernel takes by value, and the gradient rule.
Each data() call runs one fuse scope
When data() is requested, TypeNN collects the nodes under the Tensor that have no array yet, makes one resident array for each, and uploads each leaf. It then calls TypeShade fuse with a body that calls each node's kernel function in graph order, and reads the Tensor back once.
Shape checks · graph nodes · autograd · kernel functions
fuse scope plan · dispatches · backend tiers · runtime resources
Backends and limits
One active TypeNN Device is supported per JavaScript context because TypeShade call-layer configuration is process-global.
Read the plan in device.lastReport
The compiler puts consecutive kernel calls in one dispatch when TypeShade's fusion rules hold. On WebGPU, a.add(b).mul(c).relu() runs as one dispatch. A reduction, a read at another index, or too many storage buffers starts a new dispatch. After a read, device.lastReport shows the tier, the dispatches, the submissions, and the groups of calls. On the CPU tier the report has no dispatches and one group for each call.