Graph Fusion Optimization Based on PyTorch Inductor
Inductor is a new compilation backend introduced by PyTorch in 2022, consisting primarily of modules for graph analysis, operator fusion, scheduling optimization, and low-level code generation. The inductor’s operator fusion module can merge multiple operators into a single, larger fused operator to reduce memory access overhead. However, it currently lacks support for fusion across kernel boundaries, limiting the exploitation of further optimization opportunities. To address this issue, this paper proposes a kernel fusion optimization method based on operator characteristics. The method constructs candidate fusion pairs by extracting operator features such as computational scale and dependency relationships. It also employs a cost evaluation and fusion decision mechanism to automatically perform cross-kernel fusion. Experiments were conducted on the NVIDIA 3060 and A100 platforms. The results show that approximately $30 \%$ of the kernels in the tested models can be effectively fused using the proposed optimization method. The fused kernels achieve an average speedup of 1.6 on the A100 platform and 1.3 on the 3060 platform, while ensuring computational correctness.
Authors
- Yingying Li (ORCID: https://orcid.org/0000-0003-1905-030X)
- Ziming Dong (ORCID: https://orcid.org/0000-0001-5741-7868)
- Lin Han (ORCID: https://orcid.org/0000-0003-4180-1288)
- Jianan Li (ORCID: https://orcid.org/0000-0001-5219-4597)
- Wei Gao (ORCID: https://orcid.org/0009-0001-2732-6321)
- Can Liu (ORCID: https://orcid.org/0000-0002-1175-0734)
Institutions
- PLA Information Engineering University (CN)
- Zhengzhou University (CN)
Publication Details
- Published
- 2025-06-20
- DOI
- https://doi.org/10.1109/icecai66283.2025.11170583
- Primary Topic
- Industrial Technology and Control Systems
- Type
- article
- Field-Weighted Citation Impact
- 0.00