Compiling ONNX Neural Network Models Using MLIR

08/19/2020
by   Tian Jin, et al.
0

Deep neural network models are becoming increasingly popular and have been used in various tasks such as computer vision, speech recognition, and natural language processing. Machine learning models are commonly trained in a resource-rich environment and then deployed in a distinct environment such as high availability machines or edge devices. To assist the portability of models, the open-source community has proposed the Open Neural Network Exchange (ONNX) standard. In this paper, we present a high-level, preliminary report on our onnx-mlir compiler, which generates code for the inference of deep neural network models described in the ONNX format. Onnx-mlir is an open-source compiler implemented using the Multi-Level Intermediate Representation (MLIR) infrastructure recently integrated in the LLVM project. Onnx-mlir relies on the MLIR concept of dialects to implement its functionality. We propose here two new dialects: (1) an ONNX specific dialect that encodes the ONNX standard semantics, and (2) a loop-based dialect to provide for a common lowering point for all ONNX dialect operations. Each intermediate representation facilitates its own characteristic set of graph-level and loop-based optimizations respectively. We illustrate our approach by following several models through the proposed representations and we include some early optimization work and performance results.

READ FULL TEXT
research
10/02/2015

A Primer on Neural Network Models for Natural Language Processing

Over the past few years, neural networks have re-emerged as powerful mac...
research
10/23/2018

Neural Network Models for Natural Language Inference Fail to Capture the Semantics of Inference

Neural network models have been very successful for natural language inf...
research
04/12/2021

AI Powered Compiler Techniques for DL Code Optimization

Creating high performance implementations of deep learning primitives on...
research
09/20/2017

Open Source Dataset and Deep Learning Models for Online Digit Gesture Recognition on Touchscreens

This paper presents an evaluation of deep neural networks for recognitio...
research
06/01/2015

Blocks and Fuel: Frameworks for deep learning

We introduce two Python frameworks to train neural networks on large dat...
research
09/18/2023

Information based explanation methods for deep learning agents – with applications on large open-source chess models

With large chess-playing neural network models like AlphaZero contesting...
research
02/01/2021

Forensicability of Deep Neural Network Inference Pipelines

We propose methods to infer properties of the execution environment of m...

Please sign up or login with your details

Forgot password? Click here to reset