Introduction
The Torq compiler is based on MLIR, a framework designed to support compilation for heterogeneous hardware. Built as a plugin on top of IREE, the Torq compiler enables efficient deployment of ML models across various architectures, with special optimizations for Synaptics hardware.
This comprehensive guide will help you understand, install, and effectively use the Torq compiler system for deploying machine learning models on Synaptics hardware.
Technical Background
The compilation is implemented as a sequence of passes that lower a high-level representation to an IR expressed using dialects that can be customized to represent target-specific operations. MLIR itself is part of the LLVM ecosystem, it bring important components like the Linalg, TOSA and LLVM-IR dialects, some important generic algorithm like tiling, and of course the LLVM compiler itself which is used to compile part of a graph targeting the CSS or the Host CPU. To leverage these features, Torq compiler is built as a plugin on top of IREE, an MLIR-based end-to-end compiler and runtime specialized for lowering ML models to a variety of architectures including CPUs, GPUs and custom hardware.
Distribution Contents
The Torq compiler and runtime are distributed as separate Python wheels in the GitHub release assets:
Compiler Wheel (torq-compiler)
Provides
torq-compile,torq-lab, and the compiler Python toolsSupports optional extras for ONNX, TFLite, TensorFlow, and profiling
Currently provided for x86-64 compiler hosts
Runtime Wheel (torq-runtime)
Provides
torq-run-module, the runtime Python API, and the host simulator where supportedAvailable for supported x86-64 hosts and aarch64 boards
Install both wheels when compiling and running models on the host. See Getting Started for installation instructions.
System Requirements
Supported operating systems:
x86-64 Linux hosts for compilation
Supported Linux x86-64 hosts and aarch64 boards for runtime execution
Supported hardware: Synaptics Torq hardware (SL2610 SoC families)
Getting Started
Refer to the Getting Started for installation and setup instructions. Ensure your system meets the requirements above before proceeding.
Support and Contact
For technical support, questions, or to report issues, please contact your Synaptics support representative or use the available support channels.