RLX in WebAssembly — forward & backward

A two-layer MLP (relu(x·W1 + b1)·W2 + b2, MSE loss) is built as an RLX IR graph. The backward pass is the autodiff gradient graph. The same graphs run on every backend — only the executor differs.

Statusloading…
CPU backend
WebGPU
WebGL2

CPU — forward

CPU — backward (loss + gradients)

CPU — training (SGD)

Real transformer — decoder-only (RMSNorm · RoPE · causal attention · SwiGLU)

WebGPU — forward & backward (compute shaders)

WebGL2 — forward & backward (render-to-texture)