Investigate different approaches to binding to ggml
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 30/100
- Tipo di issue
- Refactoring
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Ambito
- backend, build-system, devtools
Direzione di ricerca
Esamina il binding ctypes esistente in ggml/ggml.py e la configurazione di build di CMakeLists.txt. Esamina i branch di test per nanobind e SWIG per comprendere i tentativi di integrazione. L’obiettivo è valutare i sistemi di binding in base ai requisiti elencati: prestazioni, manutenibilità, estensibilità e compatibilità con il sistema di build di ggml. Determina i compromessi di ciascun approccio senza implementare una soluzione completa.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Python
- Stelle
- 152
- Fork
- 16
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di abetlen/ggml-python
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
abetlen/ggml-python#91 ·
-
Import errorAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
abetlen/ggml-python#90 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
abetlen/ggml-python#93 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
abetlen/ggml-python#92 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 30/100
abetlen/ggml-python#21 ·
Tutte le issue di abetlen/ggml-python
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
aws-samples/sample-per-model-bedrock#243 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
FuRongJun-1999/dsh-memory#404 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
bug frontend
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
PennyLaneAI/catalyst#3337 ·
I maintainer di solito rispondono entro 1 giorno
-
Workflow.schedule stops when a cron deadline passes before sleepForse già presa @HuaTNA l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno