RunMat
  • Pricing
RunMat
GitHub
GitHub
Sign inTry in browser
DesktopRuntimePhysicsCADAdministrationAgent

Get RunMat updates

New releases, guides and examples.

Product+
  • Runtime
  • GPU
  • Parallel
  • Compile
  • Interop and MEX
  • Simulation
  • MCAD
  • ECAD
  • Enterprise
  • AI integrations
  • Pricing
  • Download
Math+
  • Signal processing
  • Linear algebra
  • Statistics
  • Curve fitting
  • Differential equations
  • Control systems
  • Optimization
  • Finance
  • Data and tables
  • Plotting
Physics+
  • Simulation overview
  • Structural
  • Thermal
  • Electromagnetic
  • Joule heating
  • Thermal stress
  • Acoustics
  • Fluid flow
  • Conjugate heat transfer
  • Fluid–structure
  • What is FEA
Industries+
  • Aerospace
  • Automotive and transportation
  • Defense
  • Electronics and semiconductors
  • Energy
  • Industrial machinery
  • Life sciences
  • Quantitative finance
Learn+
  • Guides
  • Docs
  • Function reference
  • Language reference
  • Migration guide
  • Changelog
  • MATLAB Online
  • MATLAB AI agent
  • For students
Compare+
  • RunMat vs MATLAB
  • RunMat vs Ansys
  • RunMat vs SOLIDWORKS
  • RunMat vs Altium
  • RunMat vs Cadence
  • RunMat vs COMSOL
  • RunMat vs Python
  • RunMat vs Julia
  • RunMat vs Physics AI
  • RunMat vs Octave
  • Benchmarks
  • MATLAB alternatives
  • All comparisons
Company+
  • About
  • Blog
  • Contact
  • Source code↗
  • License
  • Privacy
  • Terms

Product

  • Runtime
  • GPU
  • Parallel
  • Compile
  • Interop and MEX
  • Simulation
  • MCAD
  • ECAD
  • Enterprise
  • AI integrations
  • Pricing
  • Download

Math

  • Signal processing
  • Linear algebra
  • Statistics
  • Curve fitting
  • Differential equations
  • Control systems
  • Optimization
  • Finance
  • Data and tables
  • Plotting

Physics

  • Simulation overview
  • Structural
  • Thermal
  • Electromagnetic
  • Joule heating
  • Thermal stress
  • Acoustics
  • Fluid flow
  • Conjugate heat transfer
  • Fluid–structure
  • What is FEA

Industries

  • Aerospace
  • Automotive and transportation
  • Defense
  • Electronics and semiconductors
  • Energy
  • Industrial machinery
  • Life sciences
  • Quantitative finance

Learn

  • Guides
  • Docs
  • Function reference
  • Language reference
  • Migration guide
  • Changelog
  • MATLAB Online
  • MATLAB AI agent
  • For students

Compare

  • RunMat vs MATLAB
  • RunMat vs Ansys
  • RunMat vs SOLIDWORKS
  • RunMat vs Altium
  • RunMat vs Cadence
  • RunMat vs COMSOL
  • RunMat vs Python
  • RunMat vs Julia
  • RunMat vs Physics AI
  • RunMat vs Octave
  • Benchmarks
  • MATLAB alternatives
  • All comparisons

Company

  • About
  • Blog
  • Contact
  • Source code↗
  • License
  • Privacy
  • Terms
GitHubXLinkedIn

© Dystr, Inc. · RunMat v0.7.2, Nov 26, 2026 ·

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.

/
    • Session Engine
    • Execution Requests
    • Workspace State
    • Variable Inspection
    • Workspace Replay
    • Interaction & Streams
    • Host Integration
    • Execution
    • Async Execution
    • Errors & Diagnostics
    • Parallel Execution
    • Remote Execution
Docs>Runtime>Sessions and Execution

Variable Inspection

Hosts should not read workspace_values directly. The session exposes workspace metadata and bounded materialization APIs so UI panes can show useful previews without forcing large CPU or GPU transfers.

Workspace Entries

workspace_snapshot() returns a WorkspaceSnapshot with sorted WorkspaceEntry values.

FieldMeaning
nameVariable name.
class_nameMATLAB class label.
dtypeNumeric or GPU precision label when known.
shapeDimensions in MATLAB order.
is_gpuWhether the value is GPU resident.
size_bytesApproximate host/device size when available.
previewSmall numeric preview with a truncation flag.
residencycpu, gpu, or unknown.
preview_tokenOpaque token for later materialization.

Preview tokens are regenerated when a snapshot is built. Hosts should treat them as short-lived selectors tied to the current session state.

Materialization Flow

Loading diagram...

WorkspaceMaterializeTarget can select by variable name or preview token. WorkspaceMaterializeOptions can request a maximum element count and an optional slice. Slice options are sanitized against the actual tensor shape before any data is read.

CPU Values

CPU tensors can be sliced in host memory. If no slice is requested, the session returns a bounded preview using the requested element limit, clamped to the default materialization limit.

Non-numeric values still return class, shape, residency, and the original Value; numeric preview data is only produced where the preview helpers understand the value shape.

GPU Values

GPU tensors stay on device unless the host asks for materialization. For preview and slice requests, the session avoids downloading the whole tensor:

  1. It asks the active provider for a small gathered tensor using linear indices.
  2. It downloads only that gathered tensor.
  3. It frees the temporary provider handle on a best-effort basis.

If no provider is registered for a GPU handle, materialization fails instead of silently gathering incorrect data.

Host Guidance

Use workspaceSnapshot to populate variable lists and small previews. Use materializeVariable only when a user expands a value, opens a viewer, or requests a larger slice. Large data-file previews are a separate WASM API and should not be confused with live session workspace materialization.

On this page
  • Workspace Entries
  • Materialization Flow
  • CPU Values
  • GPU Values
  • Host Guidance