Runtime

Toward a Standard Neural Execution Engine (NEE)

Report summary

Executive Summary Machine learning (ML) workloads are fragmented across many frameworks, compilers, and hardware. A Neural Execution Engine (NRT) – a low-level runtime that standardizes model inference/serving – could reduce this friction by providing a common execution layer. This report finds that

Status
Research archive item
Category
Runtime
Length
5,346 words
Reading time
25 minutes
Report type
evaluation

Key topics

  • Runtime
  • AI
  • Python
  • Rust
  • Privacy
  • Semantic Systems
  • Research Archive
  • Strategy

Research provenance

Archive status
Research archive item
Content identity
sha256:f4a61266081f352369561223128d9cae6a84c73e66be6263b52ca3121c96ed78

For citation, use the report title and canonical URL. Archival presence does not establish authorship or promote report statements into portfolio evidence.

This page renders the archived Markdown as safe, formatted HTML. It is background research and does not become a portfolio claim without evidence review.

Full report

On this page

Executive Summary

Machine learning (ML) workloads are fragmented across many frameworks, compilers, and hardware. A Neural Execution Engine (NRT) – a low-level runtime that standardizes model inference/serving – could reduce this friction by providing a common execution layer. This report finds that many component technologies already exist (ONNX, XLA, MLIR, TVM, Glow, IREE, etc.), and industry momentum favors open formats and runtimes. For example, the ONNX initiative (now under LF AI) has unified model representation and led to a “rich ecosystem of frameworks, compilers, runtimes, [and] accelerators”. Similarly, Google’s MLIR and XLA (StableHLO) aim to harmonize IRs across hardware. Nevertheless, a fully universal runtime faces challenges: performance may trail highly-tuned proprietary stacks (as noted for CUDA-based systems), and hardware vendors may resist ceding control of software. Yet the growing demand for multi-platform AI (edge, mobile, cloud) means a common NRT standard is likely to attract broad support. This report analyzes architectural options (APIs, IRs, scheduling, memory, quantization, kernels, fallbacks), compatibility with ONNX/MLIR/XLA/TVM/Glow, performance/security trade-offs, developer needs, deployment scenarios, ecosystem incentives, and standardization paths. A comparative table of major projects is included, along with recommended next steps and metrics for evaluation.

Background and Motivation

Modern AI frameworks (TensorFlow, PyTorch, etc.) historically each invented their own graph formats and kernels, leading to fragmentation across tools and hardware. For instance, Facebook and Microsoft co-founded ONNX in 2017 to provide an open neural-network model format and reduce friction. Similarly, Google’s MLIR project (2019–2021) created an extensible IR ecosystem to unify compiler infrastructure. Yet observers note that today’s landscape is still heterogeneous. Christopher Lattner (MLIR lead) has pointed out that efforts to unify ML compilers “were born to bring order to the chaos”, but to date no single system has become the universal solution. In practice, NVIDIA’s CUDA (and TensorRT, cuDNN, etc.) remain dominant for GPU-based ML, acting as a de facto standard. This suggests any new NRT must either rival CUDA performance or wrap around it.

The incentive for a standard NRT is clear: developers and cloud providers want one stack that “runs everywhere” – on datacenter GPUs, CPUs, mobile NPUs, and other accelerators. For example, Apache TVM explicitly cites “universal deployment” from “data center GPUs to edge” environments. Google’s IREE demonstrates that MLIR-based runtimes can target servers, Android, iOS, bare metal, and even WebAssembly. A well-designed NRT would allow ML engineers to train in PyTorch/TF/Keras once and run on any hardware, improving portability, reducing vendor lock-in, and speeding time-to-market. The rest of this report breaks down the technical and ecosystem aspects of realizing such a universal neural runtime.

Technical Architecture Options

A Neural Runtime would sit between ML applications and hardware, handling model loading, optimization, scheduling, and execution. Key architectural elements include:

  • Intermediate Representation (IR): Choosing or defining a common IR is critical. Options include existing IRs like ONNX’s graph format or dialects within MLIR (TensorIR, linalg, etc.), or XLA’s StableHLO. For example, Glow uses a two-phase IR: a high-level domain-specific IR and a low-level address-oriented IR for memory/scheduling optimizations. MLIR itself supports custom dialects and can represent TensorFlow, ONNX, or StableHLO operations. A NRT could accept models in ONNX or TensorFlow formats and lower them into a unified IR for optimization.
  • Graph Optimization and Scheduling: Once in IR, the runtime must optimize and schedule execution. This includes operator fusion, constant folding, dead-code elimination, and memory planning. XLA, for instance, “analyzes and schedules memory usage” to eliminate many intermediate buffers. Similarly, Glow’s compiler performs whole-graph transformations before lowering to hardware code. The scheduler must also partition the graph across devices: ONNX Runtime’s design partitions a graph into subgraphs by available execution providers (EPs) (e.g. CPU, GPU, NPU) and assigns each subgraph to the best EP. A NRT could use a similar strategy: detect which ops can run on which device, then schedule parallel execution or pipelining. (Lattner notes that pipeline-parallel inference and tensor-parallel sharding are active research areas, though beyond today’s mainstream runtimes.)
  • Execution Providers and Operators: The runtime needs a library of operator kernels for different hardware. Some kernels can be vendor-specific libraries (e.g. cuDNN for NVIDIA GPUs, oneDNN for Intel CPUs, Metal Performance Shaders for Apple). Others can be generic implementations. ONNX Runtime abstracts these as Execution Providers: each EP can claim support for certain fused operators, memory allocators, and compute functions. If an operator isn’t supported by a specialized EP, ONNX Runtime falls back to a default CPU provider. In a unified NRT, one could plug in multiple backends (CUDA, Vulkan, OpenCL, FPGA drivers, etc.) as providers. For example, IREE uses hardware abstraction layers (HALs) for Vulkan, CUDA, Metal, etc., and compiles dense compute into SPIR-V or native binaries. The runtime must also handle mixed precision and quantization: it might include calibration routines or support quantized kernels. NVIDIA shows that lowering precision (e.g. FP32→FP8/INT8) cuts model size and compute substantially, but “can lead to some accuracy degradation”. A NRT should thus provide quantization pipelines (static/dynamic calibration, quant-aware training hooks) and allow final models to run in INT8/FP16 when desired.
  • Memory Management: Efficient memory allocation and reuse is essential. The runtime should pre-allocate buffers for activations, use memory pools, and possibly support shared-memory for multi-model setups. XLA’s goal includes “improve memory usage” by reusing buffers. Some runtimes (TVM, TFLite) perform static memory planning at compile-time. For dynamic scenarios, the runtime might instrument memory usage (ONNX-MLIR provides profiling hooks). Caching mechanisms (e.g. GPU memory pools, persistent memory on NN accelerators) should be exposed. In federated or secure settings, memory isolation (ensuring models’ tensors don’t leak) is also a concern (see Security section).
  • Fallback Paths: A universal runtime must handle cases where specialized kernels or devices aren’t available. ONNX Runtime uses a default execution provider to ensure model completeness. Similarly, a NRT should include a reference kernel library for all standard ops (e.g. in C++ on CPU) so that any model can run on some device. This redundancy trades performance for compatibility. A well-designed fallback might also let models run partly on one device and rest on another automatically.
  • APIs and Language Bindings: To be broadly useful, the runtime needs easy APIs. ONNX Runtime, for instance, is in C++ but has Python, C#, Java, JavaScript (Web/Node), and other bindings. It also provides command-line tools and integration with Windows ML or Azure ML. Any NRT should similarly expose modern APIs (Python/pip, C/C++, perhaps REST or JavaScript for web) and support common model loaders. For low-level use, a C API plus language bindings (as IREE does) would cover most use cases. Convenience features (graph inspection, model metadata queries, integration with tools like Netron) improve ergonomics: for example, ONNX Runtime lets you query model inputs/outputs and uses Netron for visualization.

<div align="center">

flowchart LR
    subgraph Model Preparation
      A[Trained ML Model] --> B[Export/Convert (ONNX, TF, TorchScript, etc.)]
      B --> C[Model Import & Validation (NRT)]
    end
    subgraph Neural Runtime Engine
      C --> D[Graph Optimizer (fusion, pruning, quantize)]
      D --> E[IR / Intermediate Representation]
      E --> F[Scheduler & Partitioning]
      F --> G[Execution Providers]
    end
    subgraph Hardware
      G --> H[CPU]
      G --> I[GPU/TPU]
      G --> J[NPU/Accelerator]
    end
    A -->|Fallback (if needed)| CPU

</div>

Figure: Simplified architecture of a neural runtime. Models are imported (ONNX, etc.), optimized on an IR, scheduled across devices, and executed via hardware-specific kernels. A default CPU path handles any unsupported ops.

Compatibility with Existing Standards

A practical NRT must interoperate with today’s standards rather than replace them all. The leading candidates to leverage or integrate include:

  • ONNX (Open Neural Network Exchange): ONNX is an open model format designed for interoperability. It “provides a common representation for both deep learning and traditional machine learning models” and is implemented by many vendors. A NRT should naturally accept ONNX models as input. In fact, ONNX Runtime is essentially such a runtime for ONNX graphs: it applies graph optimizations, then partitions and executes the model on various accelerators. ONNX itself is managed by LF AI/Data, illustrating open governance. Using ONNX as a frontend IR means thousands of existing models (from PyTorch, TensorFlow, scikit-learn, etc.) could run on the NRT with minimal change.
  • MLIR and HLO (High-Level Optimization): Google’s MLIR project offers a multi-level IR stack. XLA (for TensorFlow, JAX, PyTorch) uses a dialect called StableHLO as its IR. MLIR and XLA aim to unify compiler frontends, and many projects (TensorFlow, TritonLang, IREE, etc.) have adopted MLIR dialects. A NRT could use MLIR as the internal compiler framework, leveraging its Dialect system. For example, ONNX-MLIR (an open project) compiles ONNX graphs via MLIR dialects. By basing the NRT on MLIR, one could reuse existing dialects for Tensor operations and benefit from LLVM’s codegen for diverse hardware.
  • XLA (Accelerated Linear Algebra): XLA is Google’s JIT/AOT compiler for TensorFlow; it compiles StableHLO to native code. It “implements a compiler infrastructure that can target CPUs, GPUs, and other accelerators”. A NRT could interoperate with XLA by importing StableHLO IR, or by coexisting: e.g. use XLA as an execution provider for a portion of the graph. (Indeed, TensorFlow itself can fall back from XLA JIT to a TensorFlow runtime.) Conversely, XLA could compile ONNX by translating to HLO (some projects are exploring ONNX→HLO workflows).
  • TVM: TVM is an Apache open ML compiler that takes pre-trained models (ONNX, TensorFlow, etc.) and compiles them into highly optimized modules. It uses its own IR stack (Relay/Relax/TensorIR) and autotuning. TVM’s runtime can load these modules on CPU, GPU, or mobile hardware. A NRT could incorporate TVM as a compiler backend: for example, use TVM to generate optimized kernels for parts of the graph and then load them. Indeed, ONNX Runtime has an execution provider for Apache TVM. The existence of ONNX, XLA, TVM, and Glow (below) means that a NRT should aim to bridge rather than obsolete these: e.g. translate ONNX→MLIR→TVM, or use MLIR to drive TVM-like codegen.
  • Glow: Facebook’s Glow is an open-source ML compiler that “lowers the traditional neural network graph into a two-phase IR” to facilitate optimizations. It is used by PyTorch and can target CPUs, GPUs, and NPUs. Glow’s approach (graph lowering to linear algebra kernels) is compatible with a unified runtime: one could imagine Glow’s high-level IR being another input to the NRT, or its low-level IR as part of the IR pipeline. Glow focuses on supporting many hardware targets by reducing operators to a core set (e.g. matrix multiplies). A NRT could adopt this philosophy: support a rich operator set by lowering them to common primitives, then run those primitives on each device.
  • Other runtimes: Many hardware vendors have their own runtimes: NVIDIA’s TensorRT, Intel’s OpenVINO/DNNL, Arm’s NN SDK, Apple’s Core ML, Qualcomm’s SNPE, etc. These are often closed or limited-platform. A NRT would ideally offer an abstraction over these: for example, use TensorRT under the hood for NVIDIA GPUs, and OpenVINO for Intel. ONNX Runtime already does this by delegating to CUDA, TensorRT, or DirectML when available. Similarly, Android’s NNAPI is a standard C API for mobile that dispatches ops to DSPs or GPUs; it itself uses backends (like Arm NN, TFLite GPU, etc.). A new NRT might compete with or incorporate NNAPI for mobile.

In summary, a NRT should embrace open IRs (ONNX, MLIR/HLO) at its front end, and provide adapters to existing compilation stacks and vendor backends. This ensures compatibility with the current ecosystem: for example, IREE already imports ONNX, PyTorch, JAX, TF and can target dozens of devices. A unified runtime could standardize how these pieces connect, but still allow existing standards to play their roles.

Performance Considerations

A key trade-off for a universal runtime is performance vs. portability. Vendor-specific runtimes often squeeze out extra speed by exploiting hardware idiosyncrasies. For instance, one retrospective notes that even optimized MLIR-based GPU compilers like Triton still leave “15–20% performance on the table” compared to NVIDIA’s CUDA/cuBLAS. Achieving peak speed on every platform may be infeasible without proprietary concessions. Therefore, a NRT must balance:

  • Optimized Kernels vs. Generality: Using specialized libraries (TensorRT, cuDNN) yields highest throughput on a given GPU, but those libraries are not portable. A NRT might thus use those when available, but fall back to generic codegen otherwise. For example, ONNX Runtime uses NVidia’s cuDNN/TensorRT for supported ops, then a CPU kernel library for the rest. This hybrid approach trades some performance (when falling back) for completeness.
  • Compilation Overhead: Some NRT designs compile models ahead-of-time (AOT), which incurs latency before deployment but yields faster runtime. Others do JIT or interpreter-based execution. XLA, IREE, and TVM are primarily ahead-of-time: e.g. IREE compiles models for a target (Vulkan SPIR-V or native CPU code) ahead of execution. ONNX Runtime tends to be more dynamic (graph is compiled/optimized at runtime, but with caching). A new standard would need to support both modes: for cloud servers, heavy AOT is acceptable; for on-device or interactive use, quick load is crucial.
  • Memory and Precision: Support for quantization/mixed-precision (INT8, FP16, FP8) can dramatically boost speed and reduce memory, as NVIDIA highlights. However, lower precision can degrade accuracy, so the NRT should make it tunable and perhaps support quant-aware training or dynamic calibration. The NRT’s memory planner must also consider device constraints. For example, streaming large LLMs across multiple devices or splitting them (model parallelism) adds scheduling complexity. Benchmarks should measure latency, throughput, and memory use with and without quantization to capture these trade-offs.
  • Concurrency and Scaling: On cloud servers or multi-GPU systems, how does the runtime handle multiple models or pipeline parallelism? A sophisticated NRT might allow asynchronous execution of different subgraphs on different devices and overlap I/O, compute, and data transfer. However, this requires careful scheduling logic to avoid contention. Existing runtime stacks like vLLM demonstrate hierarchical scheduling for multi-GPU LLMs; a standard NRT could incorporate such ideas.

In practice, performance should be evaluated against strong baselines. Microsoft reports that ONNX Runtime gave a 2–2.5x CPU speed-up over previous solutions in Bing and Office inference tasks. A useful metric is to compare a NRT’s inference latency/throughput on standard models (ResNet50, BERT, GPT) against optimized vendor runtimes (TensorRT, OpenVINO, TFLite) and see the gap. The goal would not necessarily be to beat the best, but to deliver “good enough” performance with much higher portability.

Security and Privacy Implications

A unified runtime introduces both opportunities and risks for security and privacy:

  • Model and Data Confidentiality: Inference often involves proprietary models and sensitive user data. The NRT could leverage hardware enclaves or trusted execution to protect these. For example, the Confidential Computing Consortium’s BlindAI project uses Intel SGX enclaves to “safeguard the confidentiality of both the model and user data” during remote inference. NVIDIA’s Confidential Computing (Rubin architecture) similarly secures GPU execution and model weights in hardware. A standard runtime could integrate such support, allowing users to run inference inside secure enclaves on demand.
  • Model Integrity and Poisoning: A NRT must carefully vet models, especially if downloaded from untrusted sources. Malformed or malicious model graphs could trigger bugs or side channels. ONNX Runtime documentation warns: “It is possible to construct malicious model input to cause it to error out” and recommends validating models and running them in a safe environment. A robust NRT would include model validation layers and sandboxing (e.g. catching runtime errors) to mitigate such attacks.
  • Adversarial and Privacy Attacks: While outside the NRT’s core function, inference systems can leak information (model inversion, membership inference) if not managed. A common runtime could facilitate defenses: e.g. integrated support for differential privacy mechanisms or constant-time kernels. However, standardization could also unify attack surfaces; for instance, a vulnerability in a common runtime library could affect all users. Thus, NRT development must include security audits and adopt best practices (memory safety, fuzzing).
  • Multi-Tenancy and Side-Channels: In cloud environments, multiple models from different clients might share hardware. The runtime should support strong isolation (e.g., GPU virtualization with MIG/Passthrough, or separate process sandboxes) to prevent cross-model attacks. Side-channel resistant scheduling (avoiding cache timing leaks) could be an advanced feature, though research is ongoing. The very fact that enclave solutions like Intel SGX are being used for ML inference shows industry concern. In summary, security considerations favor an open-standard runtime (for transparency) but require new safeguards.

Developer Ergonomics and Tooling

For broad adoption, the NRT must be user-friendly:

  • Language Bindings & APIs: As noted, ONNX Runtime offers dozens of bindings. A new runtime should likewise support major programming languages (Python, C/C++, Java, JS, etc.) and platforms (Windows, Linux, macOS, iOS, Android). High-level wrappers (e.g. a PyTorch “backend” that calls NRT) could make integration seamless.
  • Debugging and Profiling Tools: Developers need to trace performance and debug models. Existing tools can serve as inspiration: ONNX Runtime includes in-code profilers and support tools; NVIDIA provides Nsight Systems for GPU traces; Intel VTune for CPU. IREE’s documentation specifically advertises “Debugging and profiling support” (with Tracy-based GPU profiling). A standard NRT should allow instrumentation of graphs (e.g. timing each operator), logging of shapes and runtimes, and integration with visualization (e.g. exporting Chrome-trace JSON). For model correctness, graph viewers (Netron) and IR dumps will help.
  • Ecosystem Integration: Tools like ML frameworks (TensorBoard), ML flow (MLflow, Kubeflow), and MLOps pipelines need to connect. For example, ONNX Runtime is easily deployed to Azure ML as a REST endpoint. Similarly, the NRT could be containerized or exposed as a microservice. Support for workflows like A/B testing or dynamic batching would enhance usability.
  • Documentation and Community: Clear documentation, tutorials, and examples will be crucial. ONNX’s documentation and Microsoft’s Azure ML docs show how emphasizing a unified workflow (“train once, run anywhere on cloud or edge”) attracts developers. The NRT should have user guides illustrating how to convert common models and deploy them.

Deployment Models (Edge, Mobile, Cloud, Multi-device)

A flexible runtime must work across deployment scenarios:

  • Edge Devices (IoT, Embedded): These have limited memory/compute. A runtime here must be lightweight (footprint <100KB perhaps) and support quantized models. IREE demonstrates this: it can compile models to binaries as small as 30 KB for embedded systems. An NRT intended for microcontrollers might integrate CMSIS-NN or Coral Edge TPU APIs. Backends like TensorFlow Lite, ONNX Runtime Mobile, or Arm NN (on Android) show what’s possible. Crucially, an edge NRT should allow cross-compilation: build on desktop for an ARM target with cross-toolchain.

<div align="center">

  • Mobile (Android, iOS): Phones and tablets often have NPUs or DSPs. Standard runtimes (Android NNAPI, Apple Core ML) already mediate ML on phones. A cross-platform NRT could offer one API on top of NNAPI/Metal internally. For example, ONNX Runtime supports Android/iOS via Vulkan or CoreML EPs. A diagram:
  graph LR
    subgraph "Cloud/Server"
      A[Client App] --> B[HTTP/REST/API]
      B --> C[NRT Inference Service (GPU/CPU)]
    end
    subgraph "Mobile Edge"
      D[Mobile App] --> E[NRT Mobile Library]
      E --> F[NPU / GPU / CPU on Device]
    end
    B -- Model --> C
    E -- Lightweight Model --> F

</div> Figure: Example deployment – a cloud inference service and on-device inference both use the same NRT. On mobile, a smaller quantized model runs via local accelerators.

  • Cloud/Datacenter: Servers may have multiple GPUs or specialized ASICs (TPUs, IPUs). Here, the NRT should support distributed or multi-device execution. For instance, ONNX Runtime can split a model across GPUs on one machine, and frameworks like vLLM demonstrate sharding LLMs across nodes. The NRT might expose parallel execution primitives (multi-stream, MPI-style scheduling) for large-scale inference.
  • Cross-device Scenarios: Some models might run partially on one device and partially on another (e.g. CPU+GPU pipeline, or GPU+DSP). The runtime scheduler must handle inter-device data movement. The architecture diagram above illustrates partitioning. A universal runtime simplifies hybrid deployments: the same graph can be split and sent to whatever devices exist, even on heterogeneous hardware.

In all cases, the NRT should abstract away the details of device initialization and communication. For example, on Android it could use Vulkan or NNAPI; on Linux it could use CUDA, ROCm, Vulkan, or SYCL. The goal is one NRT binary (or library) that, with the right drivers available, “just works” on any supported platform.

Ecosystem Incentives (Vendors & Cloud)

Why would industry converge on an NRT standard? Several forces push in that direction:

  • Hardware Vendors: Chipmakers (NVIDIA, Intel, AMD, ARM, Qualcomm, Apple, etc.) want to make their devices attractive for AI. Supporting a common runtime lowers the barrier for software developers to target their chips. In fact, companies often contribute to open runtimes: NVIDIA supports ONNX Runtime’s CUDA EP; AMD contributes to ROCm and IREE (even submitting IREE backends to MLPerf); Intel sponsors OpenVINO and has contributed to nGraph. A unified NRT with plug-ins for each vendor could unify these efforts. Conversely, vendors also fear losing differentiation: if all runtimes look the same, why buy AMD vs. NVIDIA? One compromise is that each can provide highly-optimized plugins (e.g., AMD MIGraphX, NVIDIA TensorRT) under the NRT umbrella. This keeps competition on performance while maintaining a standard API.
  • Cloud Providers: Hyperscalers (AWS, Azure, Google Cloud) support diverse hardware and frameworks. They benefit from a single runtime: it simplifies provisioning GPUs/TPUs/ASICs and lets customers port models easily. For example, Azure Machine Learning integrates ONNX Runtime as a native execution engine and reports big performance gains. AWS has custom chips (Inferentia/Trainium) with the Neuron SDK, but notably Neuron does not natively support ONNX. Users must convert ONNX to PyTorch before using AWS chips. This friction highlights the pain of non-uniform stacks. If a NRT existed, AWS could implement a Neuron EP and accept ONNX directly, simplifying adoption. Indeed, AWS’s push for open standards (e.g. Open Neural Network Exchange) could align with an NRT vision.
  • Software Frameworks: ML frameworks (TensorFlow, PyTorch, etc.) want to focus on model innovation, not low-level execution. A standard runtime offloads the deployment complexity. PyTorch has historically been more flexible (C++/TorchScript backend) than TensorFlow’s monolith. Both now adopt ONNX/tv. There is mutual incentive to rely on common backends. For instance, PyTorch’s torch.onnx exporter and TensorFlow’s tf2onnx reflect community interest in a neutral format. A universal NRT could become the target for JIT/AOT compilers of these frameworks.
  • Consortium Standardization: Industry trend favors open standards for interoperability. ONNX’s success under the Linux Foundation serves as a template. Similarly, the Khronos Group defined the Neural Network Exchange Format (NNEF) to tackle similar issues. For a NRT, an open governance model (possibly under LF AI/Data or Khronos) would be likely, to encourage contributions and trust. The ISO and IEEE have AI standard working groups, but none yet focus on runtime. A community-driven NRT could form as a working group with representatives from cloud, silicon, and framework companies.

Governance and Standardization Path

For an NRT to thrive, it must be openly governed. Possible routes include:

  • Linux Foundation / LF AI: ONNX and IREE are already under LF AI/Data. A new NRT specification could join under that umbrella, fostering vendor-neutral oversight. This encourages contributions (code and ideas) from academia and industry.
  • Consortium Model: A dedicated working group (like Khronos for graphics) could emerge. Khronos’s NNEF proves there is interest in open ML formats. They might shepherd an “Open Neural Runtime” spec.
  • Incremental Adoption: The standard could form de facto by library adoption before formal spec. For example, ONNX Runtime became popular and sets de facto standards for ONNX execution. If a leading cloud or hardware vendor open-sources a new runtime (as NVIDIA did with TensorRT or Google with IREE), it could attract ecosystem momentum. Cross-industry benchmarks (like MLPerf Inference) would drive vendors to align on compatibility.

Key factors are governance rules (open review, no single-vendor control) and versioning compatibility. As Lattner noted, the lack of clear leadership in MLIR dialects led to fragmentation. A new NRT effort must avoid that fate by establishing clear vision (performance, portability, security) and evolve with community input.

Barriers to Adoption

Despite the incentives, several barriers loom:

  • Performance Gaps: Hardware vendors (esp. NVIDIA) have deep, battle-tested stacks. The MLIR retrospective bluntly states: “Only one company has ever truly figured this out… and that’s NVIDIA. CUDA isn’t just infrastructure—it’s a strategy”. Competing hardware often ships slower or less-complete runtimes, and MLIR-based systems “leave 15–20% performance on the table”. If a standard NRT cannot match these vendor-specific speeds, cutting-edge users may ignore it in favor of CUDA/TensorRT or vendor SDKs.
  • Scope and Complexity: Supporting every operator, quantization scheme, and hardware feature is a huge task. The MLIR blog warns that “AI-related dialects are contested and incomplete”. Any NRT would have to define which ops are “standard” and how to extend. Backward compatibility and versioning of the spec (like ONNX operator sets) will be contentious. If the standard is too rigid, new research (efficient transformers, graph networks) may not fit easily. Too loose, and implementers will diverge.
  • Vendor Resistance: Companies may hesitate to invest in a public standard that reduces lock-in. For example, AWS’s Neuron stack essentially locks models to their chips (requiring ONNX→PyTorch). A voluntary standard would rely on vendors contributing high-quality backends. If AMD, Intel, Google do not fully back it, the runtime will be suboptimal on their chips. As the MLIR author notes, “competing priorities created tension” without central coordination. A governance body must ensure each vendor does its part.
  • Legacy and Momentum: The ML world has legacy code (Cuda kernels, platform-specific tools). Convincing companies to rewrite or adapt might be hard. Early attempts at cross-platform APIs (like OpenCL) saw limited success partly due to industry politics. Khronos now manages Vulkan/OpenCL, but even then NVIDIA favors CUDA. The NRT effort must show clear value to overcome inertia.

In sum, while technically feasible, a NRT standard must prove itself thoroughly (via benchmarks, broad testing) before displacing entrenched solutions.

Comparison of Existing Projects

Project / StandardScope & Key FeaturesMaturity & SupportLanguage BindingsLicense
ONNXOpen model format (DL & traditional ML) with a defined operator set. Aims for broad framework-to-hardware interop.Established (LF AI/Foundation, v1.x specs). Supported by Azure, NVIDIA, AMD, Intel, AWS, etc..Model is framework-neutral; runtimes available in C/C++, Python, C#, JavaScript, etc.Apache 2.0
ONNX RuntimeInference engine for ONNX models; uses Execution Providers (CUDA, TensorRT, OpenVINO, CPU, NNAPI, etc.) to run subgraphs. Includes graph optimizations and EP fallback.Production-ready (used in Bing, Office, Azure). Actively maintained by Microsoft with community. Supports GPU/CPU/Mobile.C, C++, Python, C#, Java, JavaScript, Swift, etc. (Android/iOS).MIT (open-source)
MLIR (LLVM)Compiler infrastructure with multiple dialects (Tensor, Linalg, Affine, etc.) that can represent ML workloads. Extensible by design.Mature infrastructure (LLVM project, used in XLA, TF, IREE, etc.). Active community, but AI dialects still evolving.C++ core, with Python bindings; used as framework by many.Apache 2.0
XLA / StableHLOTensorFlow’s Accelerated Linear Algebra compiler. Defines High-Level Optimizer (HLO) IR (now StableHLO in OpenXLA). Optimizes linear algebra, memory, and generates code via LLVM.Used in TensorFlow, JAX, PyTorch/XLA. Open-sourced via OpenXLA (LF AI) since ~2022.C++ (part of TF codebase); can be invoked from TF/PyTorch.Apache 2.0 (TF license)
Apache TVMML compiler for any hardware: imports ONNX/TF/PyTorch models, uses multi-level IR (Relay/TensorIR), auto-tuning schedules, and compiles kernels to CPU/GPU/ASCIs. Provides a small runtime to load compiled modules.Graduated Apache project. Backed by community (Amazon, Intel, etc.). Widely used in research and industry.Python (primary), C++ runtime, with bindings.Apache 2.0
Glow (Meta)Graph-lowering compiler: converts NN graphs to a high-level IR then to a low-level IR for memory scheduling. Focuses on heterogenous targets by reducing operators to core primitives. Integrated into PyTorch as an optional compiler.Mature (open-sourced 2019). Supported by Meta (Facebook). Less active in ecosystem buzz now, but codebase maintained.C++ core, Python bindings for integration.Apache 2.0
IREE (Google)MLIR-based end-to-end compiler+runtime. AOT compiles models (JAX/ONNX/PyTorch/TensorFlow) to a unified IR that includes scheduling and executable code. Supports many targets (CPU, GPU, mobiles, WASM).Production-ready (used internally at Google and by community). Hosted as LF AI/Data sandbox project. Continues active development (e.g. AMD submitted SDXL implementation).Low-level C API + bindings for C++, Python, Swift, etc..Apache 2.0
MIGraphX (AMD)Graph compiler and inference engine for AMD GPUs. Accepts ONNX/TensorFlow models and compiles end-to-end to optimize inference on ROCm. Can fuse ops, optimize performance.Part of AMD ROCm ecosystem. Version ~2.x. Used for AMD GPU inference (e.g. via ONNX Runtime EP).C++ API, Python API. Integrates with PyTorch via Torch-MIGraphX.MIT (2025)
OpenVINO (Intel)(Not listed above but worth noting) Intel’s inference engine for CPUs/VPUs. Converts ONNX/TensorFlow models to optimized code, with support for OpenVINO-specific ops.Mature, widely used in vision. Part of Intel Distribution.C++ and Python APIs.Apache 2.0
TensorRT (NVIDIA)Proprietary deep learning inference optimizer and runtime for NVIDIA GPUs. Highly tuned for FP16/INT8.Production (only NVIDIA). Free for use on NVIDIA GPUs.C++ API, Python.Closed (free)
Android NNAPISystem-level C API on Android that abstracts mobile DSP/NN cores. Allows frameworks to offload inference to device hardware.Integrated in Android (up to API 34+, now deprecated). Supported by Google.C API (accessed via higher-level frameworks like TFLite).Apache 2.0 (Android)
TensorFlow LiteMobile-optimized inference runtime for TensorFlow models. Uses flatbuffers and has interpreters/kernels for CPU, GPU, NNAPI.Stable, widely used on Android/iOS. Google-backed.C++, Java (Android), Swift/ObjC (iOS), Python.Apache 2.0

Table: Summary of prominent ML IRs, compilers, and runtimes. “Scope” describes the component’s role; language shows how developers interface with it. Many projects support ONNX or MLIR integration.

Recommendations and Next Steps

Given the above analysis, next steps for researchers and engineers include:

  • Prototype a Unified Runtime: Build a proof-of-concept NRT that ties together an open IR with multiple backends. For instance, start with ONNX import, use MLIR for optimizations, then dispatch to CPU/GPU (via LLVM or CUDA) and show it running on two different devices. This prototype would clarify integration challenges (e.g. data movement, heterogeneous scheduling).
  • Extend Benchmarks: Use standard benchmarks (MLPerf Inference, TensorFlow Micro, etc.) to compare the prototype NRT against existing runtimes. Evaluate across a range of models (vision, NLP, speech) and platforms (ARM, x86, mobile GPU) for latency, throughput, memory, and accuracy (especially with quantization). Record where the NRT lags (which ops, what overhead). These metrics will guide optimization priorities.
  • Enhance Model Security: Implement model validation and sandboxing in the NRT prototype. Experiment with running inference in software enclaves (e.g. Intel SGX) and measure overhead. Evaluate whether known model attacks (bad data, poisoned model) can be detected or mitigated in the runtime.
  • Developer Experience: Create high-level SDKs and integration examples. For example, add a PyTorch “exporter” and a C++ or Python library for inference. Provide debug printouts of graph transforms. Solicit feedback from ML engineers on usability (e.g. error messages, documentation).
  • Ecosystem Engagement: Convene discussions with framework and hardware vendors on a common API. Sharing the prototype, gather requirements (e.g. needed ops, platform support). Engage with standards bodies early to align on IR and execution semantics.

Evaluation Metrics and Benchmarks

Key metrics for any NRT should include:

  • Throughput & Latency: Measure inference speed on representative models (ResNet50, SSD, BERT, GPT) in frames-per-second or milliseconds per input. Compare to best-in-class runtimes (TensorRT, OpenVINO, TFLite). Provide both batch and real-time (batch=1) numbers.
  • Model Coverage: Percentage of ops or models from standard suites (e.g. ONNX Model Zoo) that run end-to-end without fallback. A good NRT should execute a broad operator set on each backend.
  • Resource Use: Peak memory (RAM/VRAM) per inference, binary size of runtime (for edge targets), and start-up latency. Metrics like “model size / number of parameters after quantization” can show compression effects.
  • Accuracy Preservation: For quantized/inexact modes, measure any drop in model accuracy on validation datasets.
  • Scalability: For multi-device setups, measure how latency scales with added GPUs or CPUs (weak/strong scaling).
  • Security Properties: For secure modes (if implemented), measure overhead of enclave use, and test resilience against known inference-time attacks.
  • Developer Productivity: Qualitative metrics like lines-of-code to integrate a model, or end-to-end time to deploy on a new platform. Surveys or studies can complement performance metrics to gauge ergonomics.

Using a broad benchmark suite (like MLPerf Inference for data-center and TinyML benchmarks for microcontrollers) will ensure the NRT meets diverse needs. Open-source projects should publish such benchmarks for transparency and trust.


Sources: Authoritative documentation and recent industry publications were used throughout, including ONNX Foundation materials, MLIR/XLA overviews, TVM/GLOW/IREE official sites, and technical blogs on quantization and security. These sources inform the above analysis and support the feasibility and challenges of a common neural runtime.