nn
-
deploy
Home
Playground
Inference
GitHub
Model DSL
Load example...
MNIST MLP
Tiny CNN
ResNet Block
Transformer Block
Depthwise Separable Conv
model MNIST_MLP { input x: Tensor<float32>[1, 784] // Hidden layer h1 = MatMul(x, w1) h1b = Add(h1, b1) a1 = ReLU(h1b) // Output layer h2 = MatMul(a1, w2) h2b = Add(h2, b2) probs = Softmax(h2b) output probs }
Compile & Optimize
Cmd+Enter
Graph IR
Optimized
Schedule
Generated Code
No graph to display
Write a model DSL and click Compile
Target Backend
JavaScript
WebGPU (WGSL)
WASM
Optimization Passes
Re-run
Shape Inference
Propagate tensor shapes through the graph using operation semantics
Constant Folding
Evaluate operations with all-constant inputs at compile time
Dead Code Elimination
Remove operations not reachable from any output
Operator Fusion
Fuse compatible operation sequences into single optimized kernels
Quantization
Convert float32 weights and activations to int8 for faster inference
Layout Optimization
Convert tensor layouts from NCHW to NHWC for optimal GPU execution
Memory Planning
Analyze tensor lifetimes and assign memory offsets to minimize peak usage