用少量数据让新硬件快速优化稀疏张量程序,提升训练效率。
COGNATE: Acceleration of Sparse Tensor Programs on Emerging Hardware using Transfer Learning
- 用通用硬件数据训练成本模型,再在新硬件上少量微调。
- 仅需1/20数据量即可达到专用模型性能,加速比最高达5.46倍。
- 适合早期硬件开发阶段,节省昂贵模拟器开销。
稀疏张量程序在深度学习与图分析中至关重要,推动了专用硬件加速器的发展。但针对加速器的程序优化面临双重挑战:性能对稀疏输入变化高度敏感,且早期加速器依赖昂贵的模拟器。因此,传统基于机器学习的成本模型因需大量数据训练,在早期硬件上效果不佳。为此,我们提出COGNATE框架:利用通用硬件(如CPU)的低成本数据样本训练成本模型,再在新兴硬件上进行少样本微调。该方法利用不同硬件平台间输入特征的同质性,有效缓解异构性,使成本模型仅需原所需数据量的5%即可实现相当性能。实验表明,COGNATE在SpMM上平均提速1.47倍(最高5.46倍),在SDDMM上平均提速1.39倍(最高4.22倍),显著优于现有技术。
原文摘要 · Abstract (English)
Sparse tensor programs are essential in deep learning and graph analytics, driving the need for optimized processing. To meet this demand, specialized hardware accelerators are being developed. Optimizing these programs for accelerators is challenging for two reasons: program performance is highly sensitive to variations in sparse inputs, and early-stage accelerators rely on expensive simulators. Therefore, ML-based cost models used for optimizing such programs on general-purpose hardware are often ineffective for early-stage accelerators, as they require large datasets for proper training. To this end, we introduce COGNATE, a novel framework that leverages inexpensive data samples from general-purpose hardware (e.g., CPUs) to train cost models, followed by few-shot fine-tuning on emerging hardware. COGNATE exploits the homogeneity of input features across hardware platforms while effectively mitigating heterogeneity, enabling cost model training with just 5% of the data samples needed by accelerator-specific models to achieve comparable performance. We conduct extensive experiments to demonstrate that COGNATE outperforms existing techniques, achieving average speedups of 1.47x (up to 5.46x) for SpMM and 1.39x (up to 4.22x) for SDDMM.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。