arXiv:2410.23745cs.LGcs.AI2024-10

Syno自动设计新神经算子,速度提升1.37倍以上且精度损失低于1%。

Syno: Structured Synthesis for Neural Operators

  • 基于张量维度的细粒度原语构建算子,支持高效搜索与表达式标准化。
  • 在多种硬件上实现1.37至2.06倍加速,精度损失小于1%。
  • 适合需要自动生成高效算子的深度学习系统研发者。

神经网络对更高预测精度和执行性能的追求永无止境。神经架构搜索(NAS)和张量编译器是优化这两项目的常用技术,但均局限于组合或优化已有的手工设计算子,而非生成全新设计。本文探索较少研究的神经算子合成方向,旨在自动高效地发现具有更好精度和/或速度的新算子。我们提出端到端框架Syno,实现可落地的神经算子合成。Syno采用一组定义在张量维度上的新颖细粒度原语,确保模型训练所需的多种性质,并支持表达式规范化以避免冗余候选。同时,Syno引入新型引导式合成流程,生成匹配指定输入输出维度的合法算子,并利用高效的随机树搜索算法快速遍历设计空间。实验表明,Syno在多种硬件和编译器配置下,平均获得1.37×至2.06×的速度提升,即使在经过NAS优化的模型上,精度损失也低于1%。

原文摘要 · Abstract (English)

The desires for better prediction accuracy and higher execution performance in neural networks never end. Neural architecture search (NAS) and tensor compilers are two popular techniques to optimize these two goals, but they are both limited to composing or optimizing existing manually designed operators rather than coming up with completely new designs. In this work, we explore the less studied direction of neural operator synthesis, which aims to automatically and efficiently discover novel neural operators with better accuracy and/or speed. We develop an end-to-end framework Syno, to realize practical neural operator synthesis. Syno makes use of a novel set of fine-grained primitives defined on tensor dimensions, which ensure various desired properties to ease model training, and also enable expression canonicalization techniques to avoid redundant candidates during search. Syno further adopts a novel guided synthesis flow to obtain valid operators matched with the specified input/output dimension sizes, and leverages efficient stochastic tree search algorithms to quickly explore the design space. We demonstrate that Syno discovers better operators with average speedups of $1.37\times$ to $2.06\times$ on various hardware and compiler choices, while keeping less than 1% accuracy loss even on NAS-optimized models.

神经算子自动设计张量优化高效推理

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。