RunMat
  • Pricing
RunMat
GitHub
GitHub
DownloadSign InTry in Browser
DesktopRuntimeServer
RunMat

Run math blazing fast

GitHubX (Twitter)LinkedIn

Company

  • About
  • Pricing
  • Contact

Explore

  • RunMat for academia
  • RunMat vs MATLAB Online
  • Benchmarks

Get product updates and release notes from the RunMat team.

© 2026 Dystr · Made withfor the scientific community.

RunMat™ is a registered trademark of Dystr, Inc. MATLAB® is a registered trademark of The MathWorks, Inc. RunMat is not affiliated with, endorsed by, or sponsored by The MathWorks, Inc.

LicensePrivacy
/
See all docs
Builtin Reference
    • adamupdate
    • analyzeNetwork
    • bilstmLayer
    • classificationLayer
    • combvec
    • convolution1dLayer
    • crossentropy
    • dlarray
    • dlfeval
    • dlgradient
    • dlnetwork
    • dlupdate
    • eluLayer
    • exportONNXNetwork
    • featureInputLayer
    • forward
    • fullyConnectedLayer
    • globalAveragePooling1dLayer
    • layerGraph
    • layerNormalizationLayer
    • lstmLayer
    • padsequences
    • regressionLayer
    • reluLayer
    • sequenceInputLayer
    • softmaxLayer
    • trainingOptions
    • trainnet
    • trainNetwork

forward — Run a supported dlnetwork forward pass.

forward(net,X) evaluates a RunMat dlnetwork compatibility object over numeric predictor data.

Syntax

Y = forward(net, X)

How forward works

  • Supports sequential feed-forward networks made from featureInputLayer, fullyConnectedLayer, reluLayer, eluLayer, softmaxLayer, classificationLayer, and regressionLayer.
  • Numeric matrix inputs are interpreted as observations in rows and predictors in columns.
  • dlarray inputs are unwrapped for normal execution, and the output is wrapped back into a dlarray preserving the input format metadata.
  • Inside dlfeval, host dlarray inputs and supported dlnetwork learnables are traced through fully-connected, ReLU, ELU, and softmax layers so scalar losses can be differentiated by dlgradient.
  • Name-value execution options, recurrent state outputs, branching DAG execution, custom layers, GPU-backed dlarray execution, and provider-resident autodiff are not implemented in this slice and raise explicit compatibility errors.

GPU memory and residency

forward currently gathers plain provider-resident gpuArray inputs to host before evaluating the supported layer chain outside autodiff. GPU-backed dlarray inputs are rejected before gather because native Deep Learning provider execution and tape kernels remain future acceleration work.

Example

Evaluate a feed-forward dlnetwork

layers = {featureInputLayer(2,'Name','in'); fullyConnectedLayer(2,'Name','fc'); softmaxLayer('Name','prob')};
net = dlnetwork(layers);
y = forward(net, [1 2; 3 4])

Expected output:

y is a numeric matrix with one row per observation.

Using forward with coding agents

Open a RunMat example with live inputs, then ask the agent to explain how forward changes the result.

Run a small forward example, explain the result, then change one input and compare the output.

Related Deep Learning functions

adamupdate · analyzeNetwork · bilstmLayer · classificationLayer · combvec · convolution1dLayer · crossentropy · dlarray · dlfeval · dlgradient · dlnetwork · dlupdate · eluLayer · exportONNXNetwork · featureInputLayer · fullyConnectedLayer · globalAveragePooling1dLayer · layerGraph · layerNormalizationLayer · lstmLayer · padsequences · regressionLayer · reluLayer · sequenceInputLayer · softmaxLayer · trainingOptions · trainnet · trainNetwork

Open-source implementation

Unlike proprietary runtimes, every RunMat function is open-source. Read exactly how forward is executed, line by line, in Rust.

  • View the source for forward in Rust on GitHub
  • Learn how the RunMat runtime works
  • Found a bug? Open an issue with a minimal reproduction.

About RunMat

RunMat is an open-source runtime that executes MATLAB-syntax code blazing on any GPU. It is licensed under the Apache 2.0 license.

  • RunMat automatically optimizes your math for GPU execution on Apple, Nvidia, and AMD hardware. No code changes needed. Simulations that took hours now take minutes.
  • Start running code in seconds. RunMat runs in the browser, on the desktop, or from the CLI. No license server, no IT ticket.

Getting started · Benchmarks · Pricing

Download RunMat

Download RunMat for full performance, or use RunMat in your browser for zero setup.

Download RunMatOpen Sandbox
On this page
  • Syntax
  • How forward works
  • GPU memory and residency
  • Example
  • Evaluate a feed-forward dlnetwork
  • Using forward with coding agents
  • Related Deep Learning functions
  • Open-source implementation
  • About RunMat