Automatic Generators for a Family of Matrix Multiplication Routines with Apache TVM

要約

一般行列の高性能ブロック定式化を取得するために、GotoBLAS2、BLIS、OpenBLAS などの一般的な線形代数ライブラリで採用されているアプローチに従うアルゴリズム ファミリを自動的に生成する Apache TVM オープン ソース フレームワークの利用を検討します。
乗算 (GEMM)。
% さらに、Apache TVM フレームワークも活用して、GEMM 用のプロセッサ固有のさまざまなマイクロカーネルを導出することで、生成プロセスを完全に自動化します。
これは、アセンブリ コードを使用してアーキテクチャごとに 1 つのマイクロ カーネルを手動でエンコードする高性能ライブラリの慣例とは対照的です。
% グローバルでは、TVM で生成されたブロック化アルゴリズムと GEMM 用のマイクロカーネルの組み合わせにより、1) 移植性と保守性が向上し、ソフトウェアのライフサイクルがグローバルに合理化されます。
2) ~ さまざまなデータ型、プロセッサ アーキテクチャ、行列オペランドの形状に合わせてソリューションを簡単に調整および最適化するための高い柔軟性を提供し、手動で調整したライブラリと同等 (または特定の行列形状ではさらに優れた) パフォーマンスを実現します。
3)~メモリ使用量が小さいのが特徴です。

要約(オリジナル)

We explore the utilization of the Apache TVM open source framework to automatically generate a family of algorithms that follow the approach taken by popular linear algebra libraries, such as GotoBLAS2, BLIS and OpenBLAS, in order to obtain high-performance blocked formulations of the general matrix multiplication (GEMM). % In addition, we fully automatize the generation process, by also leveraging the Apache TVM framework to derive a complete variety of the processor-specific micro-kernels for GEMM. This is in contrast with the convention in high performance libraries, which hand-encode a single micro-kernel per architecture using Assembly code. % In global, the combination of our TVM-generated blocked algorithms and micro-kernels for GEMM 1)~improves portability, maintainability and, globally, streamlines the software life cycle; 2)~provides high flexibility to easily tailor and optimize the solution to different data types, processor architectures, and matrix operand shapes, yielding performance on a par (or even superior for specific matrix shapes) with that of hand-tuned libraries; and 3)~features a small memory footprint.

arxiv情報

著者 Guillermo Alaejos,Adrián Castelló,Pedro Alonso-Jordá,Francisco D. Igual,Héctor Martínez,Enrique S. Quintana-Ortí
発行日 2023-10-31 10:36:26+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CL パーマリンク