FlashTensor: Optimizing Tensor Programs by Leveraging Fine-grained Tensor Property
Open Access
- 28 February 2025
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 183-196
Abstract
Deep neural networks (DNNs) have shown significant effectiveness in natural language processing and video applications. However, DNN models, especially for long-context tasks, introduce extremely large intermediate tensors, producing substantial memory overhead. Although considerable efforts have been made to optimize DNNs, insufficient awareness of tensor properties has hindered effective memory optimization and can lead to inefficient computations in a long-context scenario. In this paper, we present FlashTensor1, a DNN optimization system that reduces memory overhead and improves inference performance by leveraging fine-grained tensor properties. We first extract and identify essential tensor properties from a computation graph, such as reduce dependency and broadcastability. Then, we apply various optimizations involving transformation and kernel mapping based on these properties. Experiments on seven models demonstrate that FlashTensor achieves speedups of 1.50× and 3.24× on average for end-to-end and core module performance, respectively, compared to eight state-of-the-art works, on H100 (1.86× and 3.70× on A100).Keywords
This publication has 12 references indexed in Scilit:
- Optimal Kernel Orchestration for Tensor Programs with Korch2024
- SmartMem: Layout Transformation Elimination and Adaptation for Efficient DNN Execution on Mobile2024
- PyTorch 2: Faster Machine Learning Through Dynamic Python Bytecode Transformation and Graph Compilation2024
- FreeTensor: a free-form DSL with holistic optimizations for irregular tensor programs2022
- AStitch: enabling a new multi-dimensional optimization space for memory-intensive ML training and inference on modern SIMT architectures2022
- DNNFusion: accelerating deep neural networks execution with advanced operator fusion2021
- A review on deep learning approaches in healthcare systems: Taxonomies, challenges, and open issuesJournal of Biomedical Informatics, 2021
- TASO2019
- Triton: an intermediate language and compiler for tiled neural network computations2019
- RooflineCommunications of the ACM, 2009