arrow
返回

TSCompiler: efficient compilation framework for dynamic-shape models

delete2024-09-13
delete0
PRE
AI
X
Xiang Luo
C
Chen Zhang *
C
C. Geng
Y
Yanzhi Yi
J
Jiahui Hu
R
Renwei Zhang
Z
Zhen Zhang
G
Gianpietro Consolaro
杨
杨帆 (Fan Yang)
T
Tun Lü
N
Ning Gu
S
Shang Li *
DOI:10.1007/s11432-024-4071-6delete
delete原文链接
delete分享
delete收藏
摘要

摘要

En 中文
Today's deep learning models face an increasing demand to handle dynamic shape tensors and computation whose shape information remains unknown at compile time and varies in a nearly infinite range at runtime. This shape dynamism brings tremendous challenges for existing compilation pipelines designed for static models which optimize tensor programs relying on exact shape values. This paper presents TSCompiler, an end-to-end compilation framework for dynamic shape models. TSCompiler first proposes a symbolic shape propagation algorithm to recover symbolic shape information at compile time to enable subsequent optimizations. TSCompiler then partitions the shape-annotated computation graph into multiple subgraphs and fine-tunes the backbone operators from the subgraph within a hardware-aligned search space to find a collection of high-performance schedules. TSCompiler can propagate the explored backbone schedule to other fusion groups within the same subgraph to generate a set of parameterized tensor programs for fused cases based on dependence analysis. At runtime, TSCompiler utilizes an occupancy-targeted cost model to select from pre-compiled tensor programs for varied tensor shapes. Extensive evaluations show that TSCompiler can achieve state-of-the-art speedups for dynamic shape models. For example, we can improve kernel efficiency by up to 3.97x on NVIDIA RTX3090, and 10.30 x on NVIDIA A100 and achieve up to five orders of magnitude speedups on end-to-end latency.
Keyword:
machine learning
tensor compilers
dynamic shape
operator fusion
code generation
autotuning
err分享
err收藏
UniSparTa: A Unified Sparse Tensor Program Tuning FrameworkUniSparTa: 一种统一的稀疏张量程序调优框架
err2025-11-24
err0
PREAI
errZihan Wang; Lei Gong; Xiangjun Qu; Cheng Tang; Wenqi Lou; Teng Wang; Qianyu Cheng; Xianglan Chen; Chao Wang; Xuehai Zhou
err分享
err收藏
A Survey on Compiler Autotuning using Machine Learning基于机器学习的编译器自动调优研究综述
err2018-09-18
err123
errOAAI
errAshouri, Amir H.; Killian, William; Cavazos, John; Palermo, Gianluca; Silvano, Cristina
err分享
err收藏
Dynamic Quantum Circuit Compilation动态量子电路编译
err2025-12-15
err0
PREAI
errKun Fang; Munan Zhang; Ruqi Shi; Yinan Li
err分享
err收藏
Enabling One-Size-Fits-All Compilation Optimization for Inference Across Machine Learning Computers实现一刀切的编译优化,以实现跨机器学习计算机的推理
err2021-01-01
err2
errOAAI
errWen, Yuanbo; Qi Guo; Du, Zidong; Xu, Jianxing; Zhang, Zhenxing; Xing Hu; Wei Li; Rui Zhang; Chao Wang; Zhou Xuehai; Chen, Tianshi
err分享
err收藏

期刊

Science China Information Sciences 封面图
Science China Information Sciences
IF:
7.6
论文数:
4.9K
被引数:
1.2W

机构

H
huawei technologies
学者数:
104
论文数: 62
被引数: 3.2K
上海交通大学 封面图
上海交通大学
学者数:
1.4W
论文数: 4.2K
被引数: 8.7W
哈尔滨工业大学 封面图
哈尔滨工业大学
学者数:
1.1W
论文数: 3.1K
被引数: 5.7W
复旦大学 封面图
复旦大学
学者数:
1.0W
论文数: 2.8K
被引数: 5.6W
学者 查看更多机构
引用论文

引用论文

Reconstruction of Below-Knee Stump Using the Salvaged Foot Fillet Flap
err1995-09-01
err0
PREAI
errYuan-Cheng Chiang; Fu-Chan Wei; Jun-Wen Wang; Wun-Schen Chen
err分享
err收藏
err分享
err收藏
err分享
err收藏