Splitting gotoblas_t into parameters and kernels to re-use kernels between dynamic targets
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- リファクタリング
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- c
調査の方向性
common_param.h の gotoblas_t から始め、カーネルとパラメータを選択する動的ターゲットのロジックを追跡します。次に、DYNAMIC_KERNELS、DYNAMIC_PARAMS、DYNAMIC_LIST、DYNAMIC_ARCH の Makefile 定義を調べます。パラメータと関数ポインタが別々の構造体になり、動的ターゲットが共有カーネルとターゲット固有のパラメータを組み合わせられ、既存のビルドモードが引き続きサポートされれば完了です。
索引モデルが issue の本文から書いたものです。
説明
This would greatly help with the competing demand of re-using our kernels between different cores with different parameters whilst not overly bloating the dynamic binary.
Looking at gotoblas_t (https://github.com/OpenMathLib/OpenBLAS/blob/develop/common_param.h#L1211), there are two parts, parameters such as:
int sgemm_p, sgemm_q, sgemm_r;
int sgemm_unroll_m, sgemm_unroll_n, sgemm_unroll_mn;
And function pointers, such as:
int (*sgemm_kernel )(BLASLONG, BLASLONG, BLASLONG, float, float *, float *, float *, BLASLONG);
int (*sgemm_beta )(BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG);
The parameters take up far less space than all of the compiled kernels, so I'm proposing splitting gotoblas_t into openblas_kernels and openblas_params data structures. That would allow our dynamic logic to do something like this:
case NEOVERSEV1:
openblas_kernels = openblas_kernels_ARMV8SVE;
openblas_params = openblas_params_NEOVERSEV1;
This allows sensible defaults (such as the minimum cache size for a particular core should it not be queriable dynamically) without duplicating the kernels multiple times.
We can mark these with DYNAMIC_KERNELS and DYNAMIC_PARAMS in the Makefile, DYNAMIC_LIST would build both for all and DYNAMIC_ARCH would be our current favourites.
@martin-frbg, what do you think?
- 主要言語
- C
- スター
- 7.6k
- フォーク
- 1.7k
- 平均マージ
- 1日 3時間
- マージ済み PR(30日)
- 42
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
OpenMathLib/OpenBLAS のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
OpenMathLib/OpenBLAS#6029 · コメント 21 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
OpenMathLib/OpenBLAS#6028 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
OpenMathLib/OpenBLAS#6005 · コメント 21 件 · リアクション 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
OpenMathLib/OpenBLAS#5930 · コメント 2 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
OpenMathLib/OpenBLAS#5870 · コメント 4 件 ·
OpenMathLib/OpenBLAS の issue をすべて見る
似ている issue
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
FujiNetWIFI/fujinet-firmware#1649 · コメント 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
HarbourMasters/Shipwright#7229 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
riscv-software-src/riscv-isa-sim#2435 · コメント 1 件 ·
-
bug Self Built Image SNAPSHOT Supported Device target/ramips
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100