arXiv:2611.04273cs.LGNov 2026

Manuscript Offprint

arXiv:2611.04273

Deep Learning Compilers: Architecture, Optimization, and Empirical Characterization

Jinghao Wen, Ruixuan Wang, Xun Jiao

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

JINGHAO WEN, RUIXUAN WANG, and XUN JIAO, Villanova University, USA

As deep learning (DL) models become increasingly complex and hardware architectures grow more heterogeneous, DL compilers play a critical role in optimizing computational efficiency and enabling scalable deployment. This paper presents a systematic analysis of DL compilers, covering their architectural evolution, compilation workflows, optimization techniques, and emerging research directions. We organize DL compiler architectures into frontend, middle-end, and backend stages, emphasizing the role of the middle-end in connecting high-level model representations with hardware-specific optimizations. We further examine representative DL compilers and recent optimization techniques across different compilation stages. Beyond architectural and technical analysis, we conduct an empirical evaluation of compiler behaviors to investigate the effectiveness of graph optimization, compilation overhead, and dynamic-shape handling. Experiments using PyTorch/TorchInductor on an NVIDIA RTX A6000 demonstrate that compiler benefits depend strongly on workload characteristics, with speedups of up to 8.21×8.21\times for fusion-friendly computation graphs, while other workloads exhibit limited improvements. Our results further reveal that compilation overhead can require thousands of executions to amortize, and dynamic-shape compilation reduces cumulative shape-transition costs by approximately 70% at the expense of modest steady-state performance degradation. By combining systematic architectural analysis with quantitative experimental evidence, this work provides insights into the design, optimization, and practical deployment of modern DL compilers.

CCS Concepts: • Software and its engineering → Compilers; • Computing methodologies → Artificial intelligence.

Additional Key Words and Phrases: Deep learning, Deep learning compiler, Optimization, System

1 Introduction

From computer vision (CV) [30] and natural language processing (NLP) [14] to recommendation systems [25], autonomous driving [13] and robotics [82], deep learning (DL) models have become foundational in a wide range of artificial intelligence (AI) applications. DL models like convolutional neural network (CNN) [48], recurrent neural network (RNN) [75], transformer [86] and graph neural networks (GNNs) [96] are growing in size and complexity in these days, and deployed on increasingly diverse hardware platforms.

To simplify the build and deployment of complicated DL models, DL frameworks like PyTorch [69], TensorFlow [1], Caffe [37] and Keras [61] are proposed to play a crucial role in enabling efficient model development. They provide high-level abstractions for building sophisticated models, making it easier for developers to work with layers, loss functions, and optimizers. These frameworks also handle backpropagation and gradient updates automatically. However, designed to be general-purpose, these frameworks have limited ability to fully optimize code for specialized hardware like custom accelerators [92]. Furthermore, predefined operators in frameworks restrict compiler optimizations for more targeted, hardware-tailored operations [49]. Computational overhead associated with abstraction layers may lead to suboptimal performance compared to highly specialized compiler optimizations.

From the development of single-core processors to multi-core processors, and now with the rapid development of DL, domain-specific architectures (DSA) have risen rapidly, such as AI chips, GPU chips, and NPU chips. As hardware technology continues to advance, it has entered a new

Authors' Contact Information: Jinghao Wen, jwen01@villanova.edu; Ruixuan Wang, rwang8@villanova.edu; Xun Jiao, xun.jiao@villanova.edu, Villanova University, DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING, Villanova, Pennsylvania, USA.

Figure

Fig. 1. Normal architectural design of DL compilers.

era of computing acceleration, which hardware platforms are becoming increasingly complex and multi-layered. Modern computing acceleration platform like central processing unit (CPU), graphics processing unit (GPU) [4], tensor processing unit (TPU) [38], neural processing unit (NPU), digital signal processor (DSP) and custom accelerator adopt multi-layer architecture, including scalar, vector, multi-core, multi-packet, multi-rack and other levels of parallel processing capabilities. These target hardware architectures are equipped with unique performance characteristics and memory hierarchies. The implementation of DL models with appointed framework on specific hardware need to manually optimize code for higher efficiency by fully using of computation resource, which is time-consuming, engineering efforts-redundant and error-prone, and cannot scale as quickly as the development of new hardware accelerators [103]. Therefore, to achieve widespread application of various DL models with diverse frameworks in heterogeneous hardware architectures, the need for efficient and simplified computation has never been greater.

Compilers and corresponding toolsets like GNU compiler collection (GCC) [18], Clang and Low Level Virtual Machine (LLVM) [46] are through the automatic way to optimize the program and code generation, so that to save a lot of manpower for different underlying hardware manual optimization [45]. But these traditional compilers have limited capability to optimize DL workloads, for lacking supports of tensor operations (such as matrix multiplications, convolutions), efficient data flow management, and hardware diversity. Therefore, there is a pressing need for specialized DL compilers that can bridge the gap between high-level machine learning frameworks and efficient, hardware-specific code generation. Both industry and academia launch their own DL compilers, like Apache TVM [16], Google XLA [76], NVIDIA TensorRT [66], Meta Glow [74], Meta Tensor Comprehensions (TC) [85] and Intel nGraph [21], the architectural design of DL compilers is shown in Figure 1. Without requiring changes to the model architecture, DL compilers improve computational efficiency, reduce memory usage, and enhance model performance by applying a series of optimizations. Key processes like transforming the model into an intermediate representation (IR), performing high and low-level optimizations, and generating hardware-specific instructions are adopted to deploy complex models at scale with improved performance, making DL compilers indispensable tools for modern ML systems [78].

In this paper, we present a systematic analysis of deep learning compilers, focusing on their architectural evolution, compilation workflows, optimization techniques, and emerging research directions. We organize the compilation process into frontend, middle-end, and backend stages, providing a structured perspective on how high-level model representations are progressively transformed into hardware-specific implementations. In addition to examining representative DL compilers and recent optimization techniques, we investigate the practical performance implications of compiler optimizations through controlled experiments. Although modern DL compilers employ sophisticated techniques such as operator fusion, automatic scheduling, and dynamic-shape specialization, their effectiveness depends on workload characteristics, compilation overhead, and execution conditions. To better understand these factors, we evaluate representative computation graphs and analyze the trade-offs among execution latency, memory consumption, compilation cost, and shape flexibility. By combining architectural analysis with empirical validation, this work provides both a systematic understanding of DL compiler technologies and quantitative insights into their practical effectiveness.

Specifically, this paper makes the following contributions:

  • Architectural Analysis of DL Compilers. We systematically examine the evolution of DL compilers and their architectural distinctions from traditional compilers. We organize the compilation workflow into frontend, middle-end, and backend stages, emphasizing the role of intermediate representations (IRs) and the middle-end in connecting high-level model abstractions with low-level hardware optimizations.
  • Analysis of Optimization Techniques and Recent Advances. We investigate optimization methods across different stages of DL compilation, covering representative industrial and research compilers, including TVM, XLA, TensorRT, PyTorch 2, LADDER, Welder, Cortex, and oneDNN Graph Compiler. We further discuss recent techniques such as DNNFusion, Apollo, Ansor, Relay, and SmartMem, highlighting their optimization objectives and potential applications in modern compilation workflows.
  • Empirical Validation of Compiler Behaviors. We conduct controlled experiments using PyTorch/TorchInductor to characterize compiler performance across five representative computation graphs. Our evaluation examines steady-state execution latency, memory consumption, compilation overhead, numerical agreement, and dynamic-shape handling. The results demonstrate workload-dependent speedups of up to 8.21×, substantial compilation amortization costs, and a trade-off between dynamic-shape flexibility and static specialization.
  • Emerging Challenges and Research Directions. We investigate promising directions for DL compiler development, including cross-framework interoperability, machine learning-driven optimization, debugging and verification, privacy-preserving compilation, and the integration of large language models. Together with the empirical findings, these discussions highlight important challenges and opportunities for improving the efficiency, adaptability, and reliability of future DL compiler systems.

The remainder of this paper is organized as follows. Section 2 reviews the development of DL compiler research and related studies. Section 3 introduces the evolution of traditional and DL compilers. Section 4 describes the architectural design and compilation process of DL compilers, including the frontend, middle-end, backend, and multi-level intermediate representations. Sections 5 and 6 discuss key compiler components, optimization methods, and recent technological

Figure

Fig. 2. Quantitative summary of DL compiler publications

advances. Section 7 presents an empirical evaluation of compiler behaviors, focusing on workload-dependent optimization benefits, compilation overhead, and dynamic-shape handling. Section 8 explores emerging research directions and open challenges in DL compiler development. Finally, Section 9 concludes the paper.

References (28)