Deep learning (DL) compilers rely on cost models and auto-tuning to optimize tensor programs for target hardware. However, existing approaches depend on large offline datasets, incurring high collection costs and offering suboptimal transferability across platforms. In this paper, we introduce TCL, a novel efficient and transferable compiler framework for fast tensor program optimization across diverse hardware platforms to address these challenges. Specifically, TCL is built on three core enablers: (1) the RDU Sampler, a data-efficient active learning strategy that selects only 10% of tensor programs by jointly optimizing Representativeness, Diversity, and Uncertainty, substantially reducing data collection costs while maintaining near-original model accuracy; (2) a new Mamba-based cost model that efficiently captures long-range schedule dependencies while achieving a favorable trade-off between prediction accuracy and computational cost through reduced parameterization and lightweight sequence modeling; and (3) a continuous knowledge distillation framework that effectively and progressively transfers knowledge across multiple hardware platforms while avoiding the parameter explosion and data dependency issues typically caused by traditional multi-task learning. Extensive experiments validate the effectiveness of each individual enabler and the holistic TCL framework. When optimizing a range of mainstream DL models on both CPU and GPU platforms, TCL achieves, on average, 16.8x and 12.48x faster tuning time, and 1.20x and 1.13x lower inference latency, respectively, compared to Tenset-MLP.


翻译:深度学习编译器依赖代价模型和自动调优来为目标硬件优化张量程序。然而现有方法依赖大规模离线数据集,导致高昂的数据收集成本且跨平台迁移能力欠佳。本文提出TCL——一种面向不同硬件平台实现快速张量程序优化的高效可迁移编译器框架。具体而言,TCL包含三大核心组件:(1) RDU采样器——一种数据高效主动学习策略,通过联合优化代表性、多样性与不确定性仅选取10%的张量程序,在保持近原始模型精度的同时显著降低数据收集成本;(2) 基于Mamba的新型代价模型——通过参数精简与轻量化序列建模,在高效捕获长程调度依赖关系的同时,实现预测精度与计算成本之间的优化平衡;(3) 连续知识蒸馏框架——在避免传统多任务学习导致的参数爆炸与数据依赖问题的前提下,跨多硬件平台实现高效渐进式知识迁移。大量实验验证了各组件及TCL整体框架的有效性。在CPU和GPU平台上优化主流深度学习模型时,与Tenset-MLP相比,TCL平均调优速度分别提升16.8倍和12.48倍,推理延迟分别降低1.20倍和1.13倍。

0
下载
关闭预览

相关内容

17种深度强化学习算法用Pytorch实现
新智元
31+阅读 · 2019年9月16日
李沐《动手学深度学习》, PyTorch 版源代码已开源,附书籍和代码下载链接
深度强化学习简介
专知
30+阅读 · 2018年12月3日
<好书推荐> -《Pro Deep Learning with TensorFlow》分享
深度学习与NLP
12+阅读 · 2018年9月13日
【强化学习】强化学习+深度学习=人工智能
产业智能官
55+阅读 · 2017年8月11日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
12+阅读 · 2008年12月31日
VIP会员
相关主题
最新内容
《最强大的军事网状网络》
专知会员服务
7+阅读 · 9月7日
《预测陆军征兵任务分配》110页
专知会员服务
5+阅读 · 9月7日
分层反无人机系统发展新趋势
专知会员服务
11+阅读 · 9月3日
何为协作武器?
专知会员服务
11+阅读 · 9月1日
相关VIP内容
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
12+阅读 · 2008年12月31日
Top
微信扫码咨询专知VIP会员