Skip to main content
QUICK REVIEW

[論文レビュー] Optimizing CNN Model Inference on CPUs

Yizhi Liu, Yao Wang|arXiv (Cornell University)|Sep 7, 2018
Advanced Neural Network Applications参考文献 46被引用数 48
ひとこと要約

NeoCPUは、サードパーティ製ライブラリを使用せずにCPU上でCNN推論をエンドツーエンドで最適化するフレームワークを提示し、最先端と比較して最大で3.45xのレイテンシ削減を実現します。これはx86およびARMアーキテクチャ上での演算レベルおよびグラフレベルの最適化を行い、TVMの一部としてオープンソース化されています。

ABSTRACT

The popularity of Convolutional Neural Network (CNN) models and the ubiquity of CPUs imply that better performance of CNN model inference on CPUs can deliver significant gain to a large number of users. To improve the performance of CNN inference on CPUs, current approaches like MXNet and Intel OpenVINO usually treat the model as a graph and use the high-performance libraries such as Intel MKL-DNN to implement the operations of the graph. While achieving reasonable performance on individual operations from the off-the-shelf libraries, this solution makes it inflexible to conduct optimizations at the graph level, as the local operation-level optimizations are predefined. Therefore, it is restrictive and misses the opportunity to optimize the end-to-end inference pipeline as a whole. This paper presents \emph{NeoCPU}, a comprehensive approach of CNN model inference on CPUs that employs a full-stack and systematic scheme of optimizations. \emph{NeoCPU} optimizes the operations as templates without relying on third-parties libraries, which enables further improvement of the performance via operation- and graph-level joint optimization. Experiments show that \emph{NeoCPU} achieves up to 3.45$\times$ lower latency for CNN model inference than the current state-of-the-art implementations on various kinds of popular CPUs.

研究の動機と目的

  • 一般目的のCPUにおけるCNN推論の効率化を促進するため、CPUの広範な展開とサーバー・エッジ・クライアントデバイスでのCNNの利用拡大を背景に動機づける。
  • サードパーティ製ライブラリに依存しない演算レベルとグラフレベルの最適化を組み合わせたフレームワークの提案。
  • 多様なCPUアーキテクチャ(x86およびARM)にわたるエンドツーエンドの最適化を実証。
  • 結合レイアウトと演算テンプレート化が、既存ソリューションを上回るエンドツーエンドの性能を発揮することを示す。

提案手法

  • サードパーティカーネルを用いずにSIMD/FMAを活用する、フルスタックのテンプレートベースの畳み込み(CONV)実装としてNeoCPUを開発。
  • 可能な限りCONV層全体で最適化されたNCHW[x]cレイアウトを維持することで、不要なデータレイアウト変換を排除するグラフレベルの最適化を導入。
  • 2段階の最適化スキーム探索を実装:各CONVごとの局所スケジュール探索と、エンドツーエンドのレイアウトを選択するグラフレベルのDPベースまたはPBQP近似探索。
  • TVMと統合して独自の演算テンプレートとグラフレベルの最適化を可能にし、コンパイル時に不変カーネルウェイトを事前変換。
  • 複数のCPUベンダーに対して、フレームワークベース(MXNet/TensorFlow)およびフレームワーク非依存(OpenVINO)ベースラインと比較。

実験結果

リサーチクエスチョン

  • RQ1サードパーティの高性能ライブラリに依存せずに、CPU上のエンドツーエンドCNN推論を大幅に高速化できるか?
  • RQ2多様なCPUアーキテクチャに跨るエンドツーエンドレイテンシに対する結合演算レベルおよびグラフレベル最適化の影響はどの程度か?
  • RQ3データレイアウト管理(NCHW[x]c)とレイアウト変換が全体の性能とオーバーヘッドにどのように影響するか?
  • RQ4局所最適化とグローバル最適化探索の、ほぼ最良のエンドツーエンド性能達成への有効性はどの程度か?

主な発見

  • NeoCPUは、さまざまなCPU上でCNNモデル推論のレイテンシを現在の最先端実装より最大で3.45x低減します。
  • Intel Skylakeで13/15、AMD EYPCで14/15、ARM Cortex-A72 CPUsですべて15のネットワークで高性能を発揮します。
  • 最小限の依存関係で独立した、フレームワークに依存しないモジュールを生成し、プラットフォーム間での容易なデプロイを実現。
  • このアプローチのオープンソースリリースはTVMプロジェクトと統合され、より広い採用を促進。

より良い研究を、今すぐ始めましょう

論文設計から論文執筆まで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。