Key takeaways
- There is a growing demand for smart devices that are powerful yet efficient.
- TensorFlow Lite supports on-device intelligence with low latency and compact size.
- The shift to MLIR is intended to enhance TensorFlow's core infrastructure.
- Smartphones are becoming increasingly viable for running machine learning models.
- TensorFlow offers a robust ecosystem for researchers and developers in machine learning.

Need For New Compiler
Abstraction is a common trait amongst the now widely used machine learning libraries or frameworks. Dusting off the nitty-gritty details under the rug and concentrating on implementing algorithms with more ease is what any data scientist would like to get their hands on. TensorFlow rose into prominence for the very same reason- abstraction. A compiler is a piece of code which converts code written in high level(user friendly) to low-level(machine language). Compilers are full of NP-complete problems. The natural way to handle these are to go with simple heuristics. By offloading this to an offline service, one can use expensive search algorithms like reinforcement learning to get better results, without impacting interactive turnaround time. MLIR is being developed by Chris Lattner(LLVM) and it borrows significantly from LLVM IR, but with some tweaking at the architectural level that LLVM compiler has accumulated over the years. Particularly with regard to its separate treatment of intrinsics vs. built-in operations. MLIR is a compiler intermediate representation with similarities to traditional three-address SSA (Static Single Assignments) representations (like LLVM IRor SIL), but which introduces notions from the polyhedral loop optimization works as first class concepts. Another benefit of MLIR is its generalisation which enables other languages to adopt it. MLIR is more open-ended in its architecture, able to support multiple levels and "dialects" via the same infrastructure. Beyond its representational capabilities, its single continuous design provides a framework to lower from dataflow graphs to high performance target specific code. The representation allows high-level optimization and parallelization for a wide range of parallel architectures including those with deep memory hierarchies --- general-purpose multicores, GPUs, and specialized neural network accelerators.Key Takeaways
- MLIR’s main aim is to optimise computations with respect to dense matrices of high dimensionality which benefit deep learning tasks.
- MLIR has the ability to represent all TensorFlow graphs, including dynamic shapes, the user-extensible op ecosystem, TensorFlow variables, etc.
- Optimizations and transformations typically done on a TensorFlow graph, e.g. in Grappler.
- Quantization and other graph transformations done on a TensorFlow graph or the TF Lite representation.
- Representation of kernels for ML operations in a form suitable for optimization.
- MLIR has the ability to host high-performance-computing-style loop optimizations across kernels and to transform memory layouts of data.
- MLIR is designed to facilitate concurrency both in the semantic it captures and how it can be processed.
Spotted an error? Tell our editors. Read our editorial standards and corrections.
Selling to AI teams? Put your brand in front of the 5M+ people who read AIM every month. Plan a campaign





