Splitting gotoblas_t into parameters and kernels to re-use kernels between dynamic targets
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 25/100
- Issue 類型
- 重構
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- c
研究方向
從 common_param.h 中的 gotoblas_t 開始,追蹤用於選取核心與參數的動態目標邏輯。接著檢查 Makefile 中對 DYNAMIC_KERNELS、DYNAMIC_PARAMS、DYNAMIC_LIST 和 DYNAMIC_ARCH 的定義。當參數與函式指標是分離的結構、動態目標可以將共用核心與目標特定參數結合使用,且現有建置模式仍受支援時,即可視為完成。
由索引模型根據 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 天 13 小時
- 30 天內合併 PR
- 37
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
OpenMathLib/OpenBLAS 的其他 Issue
-
openblas_set_threads_callback_function is a silent no-op on Windows可能已有人在做 @martin-frbg 於 11 天前認領。 未關閉
難度 4/5 3-5 天 新手友好度 43/100
OpenMathLib/OpenBLAS#6108 · 2 則留言 · 1 個 reaction ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 45/100
OpenMathLib/OpenBLAS#6104 ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 58/100
OpenMathLib/OpenBLAS#6103 ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 52/100
OpenMathLib/OpenBLAS#6102 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 65/100
OpenMathLib/OpenBLAS#6100 · 2 則留言 ·
維護者通常 1 天內回覆
查看 OpenMathLib/OpenBLAS 的全部 Issue
相似的 Issue
-
area:docs kind:docs-drift
難度 2/5 1-3 小時 新手友好度 76/100
InauguralSystems/EigenScript#1887 ·
維護者通常 1 天內回覆
-
category:port-update
難度 2/5 1-3 小時 新手友好度 68/100
維護者通常 2 天內回覆
-
type-bug
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
feat(palindrome): add C solution可能已有人在做 @aadiitya2007 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 82/100
techcsispit/code-corner#58 · 1 則留言 ·
維護者通常 1 天內回覆
-
logo request
難度 2/5 1-3 小時 新手友好度 77/100
fastfetch-cli/fastfetch#2661 ·
維護者通常 1 天內回覆