張量程式最佳化輔助工具

FastOPT: Optimization Assistant for Tensor Programs

檔案

日期

2021

類型

語言

英文

摘要

隨著深度學習模型與應用的蓬勃發展,如何加速類神經網路運算子的運算也是愈來愈被重視的領域,深度學習編譯器作為前端深度學習框架與後端硬體平台之間的橋樑,可以提供各種硬體平台針對各種深度學習模型的效能最佳化,其中包含了針對模型特性的最佳化以及針對硬體特性的最佳化。Apache TVM 是一個知名的開源深度學習編譯器,TVM 使用自訂的領域特定語言 Tensor Expression Language 來定義針對硬體特性的運算子運算效能最佳化,TVM 也允許使用者使用tensor expression 去設計自訂的運算子最佳化,然而 TVM 並沒有提供使用者設計最佳化的輔助資訊,像是一個模型中所有運算子的運算資訊,也沒有提供輔助使用者設計最佳化的工具,除此之外,tensor expression 的語法跟一般指令式程式的語法有相當大的差異,對一般使用者來說並不是很容易上手,TVM 有一套最佳參數自動調諧工具 AutoTVM,負責找出最佳化內的最佳參數,像是 tiling size 以及 loop order,但是 AutoTVM 需要花費相當長的時間找到一組最佳化內的最佳參數。本論文提出了一套幫助使用者設計深度學習運算子最佳化的輔助工具 FastOPT,FastOPT 可以幫助使用者更快速的設計出有效的最佳化並且在更短的時間找到最佳化中的最佳參數,FastOPT 特別關注在三個關鍵的層面:(1) 提供各種深度學習模型中的運算子的運算資訊,以及一套輕鬆編寫最佳化的方法,讓使用者能專注在運算子最佳化的設計上,(2) 提供運算子最佳化找尋及複用的功能,減少使用者所需設計的最佳化的數量,(3) 針對最佳化參數搜尋工具 AutoTVM 設計了一套搜尋策略,有效減少最佳參數搜尋所需時間。根據實驗結果顯示,FastOPT 可以幫助使用者省下超過99% 的時間來找到一個模型的高效能最佳化,我們認為 FastOPT 對使用者來說是相當友善的,能夠減少使用者的開發時間,幫助使用者更加快速的找到一個深度學習模型內所有運算子的高效能最佳化。
With the rapid growth of deep learning models and deep learning-based applications, how to accelerate the inference of deep neural networks, especially the neural network operators, has become an increasingly important research area. As a bridge between a frontend deep learning framework and a backend hardware platform, deep learning compilers aim to optimize various deep learning models for a range of hardware platforms with model- and hardware-specific optimizations. Apache TVM (or TVM for short), a well-known, open source deep learning compiler, uses a customized domain-specific language, called Tensor Expression Language, to define hardware-specific optimizations for neural network operators. TVM also allows users to write tensor expressions to design customized optimizations for specific operators. However, TVM does not assist users with supporting information, such as what computations are performed in an operator, and tools for optimizing the operators in a deep learning model. In addition, tensor expressions have an entirely different syntax from imperative languages and are not easy to get started with. Furthermore, although TVM comes with an autotuning module, called AutoTVM, which facilitates tuning of optimization configurations (e.g., tiling size and loop order), AutoTVM takes quite a long time to search the optimum configurations for a set of optimizations. In this paper, we present FastOPT, an optimization assistant that assists optimization developers in designing effective optimizations for neural network operators and/or obtaining optimum optimization configurations in a timely manner. FastOPT specifically addresses three key aspects: (1) developers can focus only on designing optimizations by using FastOPT, which offers sufficient information about the operators of a given model and provides an easier way to write optimizations, (2) the number of optimizations that developers need to design can be minimized by using FastOPT, which allows optimizations to be reused, and (3) the tuning process can be greatly simplified by using FastOPT, which implements a set of tuning strategies in AutoTVM. The evaluation results showed that FastOPT reduced more than 99% of time in terms of developing adequate optimizations for operators in a model. We believe that FastOPT is friendly to optimization developers and allows them to develop effective optimizations for neural network operators quickly.
顯示完整詮釋資料 統計資料

引用此條目

Hsieh, Y.-S. (2021). FastOPT: Optimization Assistant for Tensor Programs. https://thesis.lib.nycu.edu.tw/handle/20.500.14371/79263

BibTeX RIS

引用文字依 APA 第 7 版格式自動產生,使用前請再核對。

分享

永久網址:https://thesis.lib.nycu.edu.tw/handle/20.500.14371/79263