Svashasan Logo
Simulated data

AI and Machine Learning · Inference runtime

ONNX Runtime

Also known as ORT, onnxruntime, ONNX Runtime execution provider

IntermediateSource-checked · awaiting technical reviewLast reviewed 6 December 2026

ONNX Runtime is an open-source, cross-platform engine for running ONNX models. It optimises the model graph and delegates parts of it to hardware-specific execution providers such as CPU, CUDA, TensorRT, OpenVINO or Qualcomm QNN.

Explanation

ONNX Runtime runs models from frameworks such as PyTorch, TensorFlow/Keras, TFLite and scikit-learn once they are in ONNX form. Before execution it optimises the graph at three cumulative levels: basic (constant folding, redundant-node elimination and fusions such as Conv+BatchNorm), extended (fusions such as GELU, attention and layer normalisation) and layout (the NCHWc layout on CPU).

Execution providers (EPs) plug in acceleration libraries. Each EP reports which nodes it can run, the graph is partitioned accordingly, and providers are tried in the priority order the application lists; nodes that no accelerator claims fall back to the CPU provider. Fallback keeps the model running, but unexpected CPU fallback can cost performance, so the resulting partition is worth checking.

Optimised graphs can be saved offline to shorten session start-up, but must then be used with the same providers, optimisation level and hardware features. ONNX Runtime also provides dynamic and static INT8 quantisation tools. Because the same ONNX file runs on a workstation CPU, it is a practical reference for checking the outputs of other toolchains.

How it works

The application creates an inference session from a model file, session options (optimisation level, threading) and an ordered list of execution providers. During session creation, ONNX Runtime optimises the graph, assigns nodes to providers through their GetCapability interface, and allocates memory. Each Run call binds inputs, executes the partitions on their providers and returns output tensors.

Automotive applications

  • Cross-platform inference on vehicle SoCs and workstations
  • Reference execution during model validation
  • INT8 quantisation of ONNX models
  • Delegating to TensorRT or NPU execution providers

Example

A driver-monitoring model runs in ONNX Runtime with the QNN execution provider listed first and the CPU provider second. Profiling shows two unsupported operators falling back to the CPU, so the model is re-exported with supported equivalents to keep the whole graph on the NPU.

An illustrative example: any figures in it are worked numbers, not measurements.

References

  1. ONNX Runtime documentation (opens in a new tab)

    ONNX Runtime (onnxruntime.ai) · Project documentation · How ONNX Runtime works · retrieved 6 December 2026

    “cross-platform machine-learning model accelerator”
  2. ONNX Runtime Execution Providers (opens in a new tab)

    ONNX Runtime documentation (onnxruntime.ai) · Project documentation · Summary of supported Execution Providers; Use Execution Providers · retrieved 6 December 2026

  3. Graph Optimizations in ONNX Runtime (opens in a new tab)

    ONNX Runtime documentation (onnxruntime.ai) · Project documentation · Graph Optimization Levels; Online/Offline Mode · retrieved 6 December 2026

Definitions are original summaries. Standards text is not reproduced; follow the links for the official publications.