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() create graph nodes with shape and operation metadata. This graph is separate from TypeShade Shader IR.
const input = device.tensor(values, { shape: [batch, features] });
const logits = input.matmul(weights).add(bias);
const output = logits.relu();
// This is the materialization boundary.
const result = await output.data();Materialization executes reachable work
When data() is requested, TypeNN traverses the dependency graph. The CPU tier evaluates compiled TypeShade programs. GPU execution prepares resident inputs, records program dispatches in a TypeShade Frame, submits the work, and reads back only the requested output.
Shape checks · graph nodes · autograd · execution order
Shader IR · backend programs · dispatch · runtime resources
Backends and limits
One active TypeNN Device is supported per JavaScript context because TypeShade call-layer configuration is process-global.
A Frame is not fusion
A Frame can collect multiple dispatches and submit them in order. The current Tensor executor still dispatches a kernel per graph node. It does not remove intermediate storage through general elementwise kernel fusion.