Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

AI Compiler Backend

In this chapter, we will explore the design of the AI compiler backend. The objective of an AI compiler backend is to enhance the efficiency of AI program execution by optimizing the Intermediate Representation (IR) generated by the compiler frontend. This optimization enables the full utilization of hardware capabilities. The backend achieves this goal by applying optimizations to IR code based on hardware capabilities. Furthermore, it selects suitable operators based on the capabilities of target hardware to execute computations efficiently, while also allocating memory to optimize data reuse and locality. Additionally, the backend often incorporates an operator compiler, which optimizes the execution strategy for code statements associated with operators.

This chapter aims to achieve the following learning objectives: