Home / Company / Blog / Why an Open Compiler Matters for Edge AI

Why an Open Compiler Matters for Edge AI

The landscape for Edge AI compilers today is a heavily fragmented one. AI/ML application developers face an array of confusing options – from multiple compiler packages from the same vendor, combinations of partially open and closed source releases and open-source versions that are locked to licensed NPU architecture implementations.

The compiler converts an AI model into the machine specific implementation and runs through many optimizations in the mapping process. With closed-source compilers, when a deployment issue requires a compiler change, customer engineers often escalate it to the vendor and may need to create a minimal reproduction that protects details of their proprietary models. A vendor application engineer must then understand the issue, coordinate a fix with the compiler developers, and return an updated toolchain for the customer to validate. If the issue persists, the cycle repeats. This process consumes engineering time and introduces schedule uncertainty in hardware programs with fixed integration milestones and launch dates.

“The support cycle repeats. The launch date does not move.”


 

Synaptics has experienced these cycles firsthand as a customer of closed-source Edge AI compiler providers, where debugging sessions haven’t resulted in a clear understanding of the problem, let alone a fix. Therefore, for our in-house Synaptics Torq™ compiler, we chose a different approach. 

Synaptics has published the Torq compiler source, built on the multi-level intermediate representation (MLIR) format [8] and the intermediate representation execution environment (IREE) [9], under an Apache 2.0 license [1, 6]. IREE is already a robust open-source compiler environment with worldwide support and optimizations for multiple platforms. The Torq compiler builds on these frameworks, and by being open-source, opens the entire compiler operation to be analyzed by the user.  In the modern era of AI coding agents, this supercharges the ability to analyze, understand, and adapt the compiler. The compiler already supports full NPU inference on the Torq NPU core for traditional CNNs, CNN–transformer hybrids, and recent LLMs and VLMs [7]. Even with that broad support, Edge AI teams may encounter an unfamiliar layer[ML1.1][ANP1.2][ANP1.3] or latency bottleneck in their own models. While Synaptics continues to optimize the Torq compiler, the published source lets customers investigate these cases and add product-specific optimizations themselves.

When a Model Layer Does Not Run on the NPU

Consider a real-time video model with an operation the Torq compiler does not yet map to the NPU core. The Torq NPU includes a RISC-V based compute element called the CPU subsystem (CSS) – a production implementation of the Coral NPU from Google Research - w[ML2.1]hich can be used to implement unsupported functions. The compiler runtime can even fall back to the main system host processor to implement functions that do not already map to the NPU core [2]. That fallback choice is reasonable when the operation and related transfers consume only a small share of total model latency, but if the model misses its frame-time target, it is time to see if a new operator can be mapped to the NPU core. The customer engineers can compare execution paths [3], inspect the compiler mapping, and add NPU support where hardware permits [1, 5]. They can then verify model outputs and measure end-to-end latency on the device. This gives them a way to address a bottleneck specific to their product.

When a Model Runs but Misses Its Latency Target

Consider a customer [ML3.1]with an audio model with real-time constraints, where each block of samples must complete processing before the next, to keep up with live audio. With a new AI audio model under development, it can happen that the model inference time is too long for the frame rate.  Before working to reduce the complexity of the AI model, the customer’s engineers need to know whether the time is spent on computation, moving data, or running part of the model away from the NPU.  This level of debug helps to understand if the model can be optimized further to meet the inference times.

The Torq compiler documentation explains how to generate annotated traces using the open-source Perfetto system profiling and analysis tool, showing NPU work, CSS execution, data transfers, overlap, and idle time, with slow events linked to model operations and compiler locations [4].

Using Perfetto traces and compiler source, customer engineers can connect a slow operation to its mapping and verify latency and outputs after a change [1, 4]. This turns an unexplained slowdown into a specific optimization target.

Why Coding Agents Make Source Access More Valuable

A coding agent can help analyze a slow or unsupported model layer, but its options are limited when the compiler implementation is hidden. With access to the Torq compiler repository, an agent can follow the recorded compilation stages, create a small case that reproduces the problem, propose code changes, and run available tests. With the open-source code view, the compiler can process all the source implementation files and build a comprehensive view on how the compiler, operators, and optimizations work. This provides a clear blueprint for the agent to further create new operators and features by building on the existing source code. For example, it could investigate why a layer took a fallback path and suggest a new conversion for review [1, 5].

An engineer still checks correctness, latency, and regressions on the target hardware. The benefit is a faster path from observation to a reviewable patch. The Torq compiler’s documented debugging, simulation, and profiling workflows give both developers and agents concrete evidence to work from [3, 4].

This option delivers a massive improvement in customer experience; issues get solved locally and in the immediate session without either the turnaround times on support tickets or the challenges in recreating problem conditions.

A License That Lets Customers Maintain Their Edge

Apache 2.0 lets customers modify and ship the compiler without publishing their optimizations [6]. They can also share customized versions with partners under the license’s notice requirements. For example, a customer and its model integration partner can use the same compiler build to reproduce results and resolve deployment issues together. This allows partners to collaborate while each chooses which improvements to publish. A generalized compiler is a very hard problem to solve, since there are an infinite number of AI model structures that can be created. Once a customer has an architecture, they can create specification optimizations that deliver competitive advantages. In the spirit of open source, a customer can submit their new changes upstream to Torq repositories that benefit the wider community (everybody wins) or keep these changes locally for their competitive advantage.

Customer Experiences

“At Google, we've let Gemini drive Torq to successfully resolve model conversion issues without human intervention. Access to source made it easier for the agent to confirm limitations and successfully find workarounds. This turned what would have been a few day back-and-forth discussion into an overnight exercise.”

— Derek Chow, Software Engineer, Google Research

“In an industry where NPU compilers are usually delivered as closed tools, having the Torq source open has changed how our team works. When our 1.58-bit models hit something, the compiler didn’t yet handle the way we needed, we could inspect the MLIR-based pipeline, make the change ourselves, and validate it on the device instead of waiting on a support cycle.”

— Daniel Chang, CEO, ENERZAi

“Using the Torq toolchain’s compile-time profiling and Perfetto, we identified optimization opportunities and shared our findings with Synaptics. Our feedback helped prioritize a feature already in development. These open tools gave us the visibility to investigate independently and collaborate with the engineering team—a level of access that is difficult to get with typical NPU toolchains.”

— Katrin Tomanek, Cofounder, SqueezLabs

“Using Torq’s open compiler, we identified a compute-intensive layer running on CSS. Through an agentic workflow, we added support for the layer on NPU core and offloaded it, significantly reducing our ASR model’s inference time—all without sharing our model IP with Synaptics.”

— Yuchen Xu, AIZip Inc.

A Compiler Ecosystem That Can Grow With Its Models

Opening the Torq compiler puts customers in control of how their models are optimized. With access to compiler code, debugging tools, and agentic workflows, they can investigate a new bottleneck, make a change that suits their workload, and validate its impact on the device. They can keep that work private or contribute useful improvements to the Torq compiler, MLIR, or IREE [1, 5, 6]. As Edge AI models evolve[ML4.1][ANP4.2], customers can shape the performance they ship, and exercise their choice when appropriate, to improve the broader compiler ecosystem.

References

[1] Torq compiler source and license
[2] Torq user guide: handling unsupported operations
[3] Torq user guide: model layer analysis
[4] Torq user guide: performance profiling
[5] Torq developer guide: adding operations
[6] Apache License 2.0
[7] Torq examples: YOLO, Moonshine, Gemma 3, and LFM2-VL
[8] MLIR project overview
[9] IREE project overview
 

Karthikeyan Shanmuga Vadivel

Karthikeyan is Director of AI Architecture in the Technology and Innovation group at Synaptics Incorporated, where he leads model and compiler optimization for the company’s Edge AI initiatives. Since joining Synaptics after earning his PhD from the University of California, Santa Barbara, he has advanced machine learning and biometric technologies across multiple product lines, including capacitive and optical fingerprint sensor technologies. His work spans imaging, perception systems, and Edge AI, with a focus on training and optimizing AI models for efficient deployment on resource-constrained processors. He holds more than 20 filed patents in Edge AI model optimization, biometrics, and image and video analysis. Karthikeyan earned his PhD and Master’s degrees from UC Santa Barbara and a B.Tech. from the Indian Institute of Technology, Madras.

Read more by Karthikeyan Shanmuga Vadivel
Edge Computing Machine Learning
Receive the latest news