TVM
from ONNX
DNNコンパイラ
DSL + バックエンドコンパイラからなる
github
https://tvm.ai/
DLフレームワークで構築した計算グラフを、TVMを介して様々なバックエンドを用いたランタイムに変換するコンパイラ
https://tvm.ai/images/main/tvm-stack.png
構成
グラフレベル
ネットワーク設計を表現
オペレータレベル
テンソル計算を表現
グラフレベル最適化
Operator fusion
複数のオペレータを融合
https://tvm.ai/2017/08/22/Optimize-Deep-Learning-GPU-Operators-with-TVM-A-Depthwise-Convolution-Example.html
Constant folding
定数から始まるノードを事前に計算、簡約
Static memory planning
中間テンソルのためのメモリを確保
Data layout ransformation
テンソル計算効率化のためにデータのレイアウトを変換
オペレータレベル最適化
テンソル計算の最適化
ループの最適化
深層学習固有の最適化 ref
量子化
剪定
関連
AutoTVM
機械学習を用いたオペレータ自動最適化
VTA
TVM専用のAIチップデザイン
Relay IR
参考
DNNコンパイラの歩みと最近の動向 〜TVMを中心に〜
TVM の紹介
結構詳しいが、途中から未読
http://proc-cpuinfo.fixstars.com/2018/11/compiler_study_report/
https://medium.com/nttlabs/tvm-conference-855df8fb7d0e
https://speakerdeck.com/masahii/tvm-intro
https://www.slideshare.net/tkatojp/autotvm-107786614
https://www.slideshare.net/takatoyamada75/vta-107976023
https://tvm.ai/2017/10/30/Bringing-AMDGPUs-to-TVM-Stack-and-NNVM-Compiler-with-ROCm.html
https://qiita.com/masahi/items/f722db96338d8868f222
http://natsutan.hatenablog.com/entry/2018/10/13/084934