Investigate different approaches to binding to ggml
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 30/100
- issue の種類
- リファクタリング
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 領域
- backend, build-system, devtools
調査の方向性
ggml/ggml.py にある既存の ctypes binding と、CMakeLists.txt のビルド設定を確認してください。nanobind と SWIG のテストブランチを調査し、統合の試みを理解してください。目的は、一覧に示された要件、すなわちパフォーマンス、保守性、拡張性、ggml のビルドシステムとの互換性に照らして、binding システムを評価することです。完全なソリューションを実装せずに、それぞれのアプローチのトレードオフを判断してください。
索引モデルが issue の本文から書いたものです。
説明
Current Approach
Use scikit-build-core and a CMakeLists file in the root directory to compile ggml as a shared library and install it relative to the ggml/ggml.py file so that it can be loaded by ctypes.CDLL.
Issues with Current Approach
#define's are not accessible from the shared library, this is an issue for values that are computed on the host system at compile time.- Platform specific functions such as those for CUDA, OpenCL, and Metal are also awkward to conditionally support with the ctypes approach
- Assuming the relative location of files in an installed package causes issues, especially when installing in ie. editable mode for local development.
- Some arguments such as ctypes Array's require awkward typing workarounds.
Alternative Binding Systems
- Cython
- Pybind11
- Nanobind (WIP)
- SWIG (WIP)
- CFFI(?)
- Stick with ctypes
Requirements
- Should be at least as fast as ctypes approach (large overhead is not acceptable for this application)
- Should be simple to maintain (ggml changes often, should be at least as simple as ctypes to add new function definitions / types / etc)
- Should be easy for others to extend or modify ggml
- Should use ggml's existing build system and flags when compiling, should not limit which platforms / optimizations can be used
- 主要言語
- Python
- スター
- 152
- フォーク
- 16
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
abetlen/ggml-python のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
abetlen/ggml-python#91 ·
-
Import errorオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
abetlen/ggml-python#90 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
abetlen/ggml-python#93 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
abetlen/ggml-python#92 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 30/100
abetlen/ggml-python#21 ·
abetlen/ggml-python の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
huggingface/sentence-transformers#4186 ·
メンテナーはふだん 5 日以内に返信
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
QuantEcon/QuantEcon.py#988 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
fabriziosalmi/certmate#1247 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
documentation good first issue
難易度 2/5 半日 初心者へのやさしさ 72/100
sujithputta02/Esapay#13 ·