New Open-Source Release: ONNX to Generic C for Embedded AI

February 20, 2026

Deploying ML inference on deeply embedded and safety-critical systems remains challenging. Many ONNX-based approaches rely on dynamic memory, complex runtimes, or platform-specific dependencies.

We, at emmtrix, have released emx-onnx-cgen, an open-source tool that compiles ONNX models into portable, deterministic, generic C code for embedded targets.

The generated code runs without dynamic memory allocation, OS dependencies, or external runtimes. Control flow and memory layout are fully static and known at compile time.

emx-onnx-cgen is a core building block of our embedded AI flow:
• ONNX models are translated into clean, auditable, architecture-independent C
• this generic C code can be further optimized using emmtrix tools such as the emmtrix Vectorizer
• target-specific optimization includes SIMD vectorization, memory layout optimization, and explicit memory management
• the result is predictable, high-performance code suitable for microcontrollers, DSPs, and safety-critical SoCs

Key properties
• no malloc / free and no hidden runtime
• deterministic control flow and memory usage
• bitwise-stable, reproducible code generation
• readable C suitable for certification and code reviews
• verified against ONNX Runtime for correctness

The project is also discussed here.

AI Workflow_Vectorization of ML Model
Cookie Consent with Real Cookie Banner