arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2304.07741cs.LGcs.AIcs.CLcs.DCcs.PF
收藏

Canvas:神经网络中的端到端内核架构搜索

Canvas: End-to-End Kernel Architecture Search in Neural Networks

Institute for Interdisciplinary Information Sciences(交叉信息研究院);Tsinghua University(清华大学);Purdue University(普渡大学)

Chenggang Zhao, Genghan Zhang, Ao Shen, Mingyu Gao

AI总结:

本文提出内核架构搜索(KAS),并构建端到端框架Canvas,通过细粒度原语随机迭代生成高性能高准确率神经内核,在常见神经网络中替换标准卷积实现平均1.5倍加速,验证了KAS的实用性。

摘要:

对神经网络(NNs)更高性能和准确率的需求从未停止。现有的张量编译和神经架构搜索(NAS)技术分别正交地优化这两个目标,但实际上在具体策略上有许多相似之处。我们利用这些机会将两者合二为一,并提出内核架构搜索(KAS)的案例。KAS从系统视角审视NAS,并深入到更细粒度的层次,以生成兼具高性能和良好准确率的神经内核。为了展示KAS的潜力,我们构建了一个端到端框架Canvas,用于寻找高质量的内核作为卷积替代。Canvas从丰富的细粒度原语集合中采样,以随机和迭代的方式构建新内核,并根据用户指定的约束进行评估。Canvas支持在内核内部自由调整张量维度大小,并使用两级求解器来满足结构合法性并充分利用模型预算。评估表明,通过在常见神经网络中用生成的新内核替换标准卷积,Canvas与之前的最先进技术相比,在可接受的准确率损失和搜索效率下实现了平均1.5倍的加速。Canvas通过重新发现过去许多手工设计的内核并产生可能启发未来机器学习创新的新结构,验证了KAS的实用性。关于源代码和实现,我们已在 https://github.com/tsinghua-ideal/Canvas 开源Canvas。

英文摘要:

The demands for higher performance and accuracy in neural networks (NNs) never end. Existing tensor compilation and Neural Architecture Search (NAS) techniques orthogonally optimize the two goals but actually share many similarities in their concrete strategies. We exploit such opportunities by combining the two into one and make a case for Kernel Architecture Search (KAS). KAS reviews NAS from a system perspective and zooms into a more fine-grained level to generate neural kernels with both high performance and good accuracy. To demonstrate the potential of KAS, we build an end-to-end framework, Canvas, to find high-quality kernels as convolution replacements. Canvas samples from a rich set of fine-grained primitives to stochastically and iteratively construct new kernels and evaluate them according to user-specified constraints. Canvas supports freely adjustable tensor dimension sizes inside the kernel and uses two levels of solvers to satisfy structural legality and fully utilize model budgets. The evaluation shows that by replacing standard convolutions with generated new kernels in common NNs, Canvas achieves average 1.5x speedups compared to the previous state-of-the-art with acceptable accuracy loss and search efficiency. Canvas verifies the practicability of KAS by rediscovering many manually designed kernels in the past and producing new structures that may inspire future machine learning innovations. For source code and implementation, we open-sourced Canvas at https://github.com/tsinghua-ideal/Canvas.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑