Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Investigate different approaches to binding to ggml

Offen
#3 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
30/100
Issue-Typ
Refactoring
Klarheit
Klar beschrieben
Aktivitätsstatus
Veraltet
Tech-Stack
c, cmake, python

Rechercherichtung

Überprüfe das vorhandene ctypes-Binding in ggml/ggml.py und die Build-Konfiguration in CMakeLists.txt. Untersuche die Test-Branches für nanobind und SWIG, um die Integrationsversuche zu verstehen. Ziel ist es, die Binding-Systeme anhand der aufgeführten Anforderungen zu bewerten: Performance, Wartbarkeit, Erweiterbarkeit und Kompatibilität mit dem Build-System von ggml. Ermittle die Trade-offs jedes Ansatzes, ohne eine vollständige Lösung zu implementieren.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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

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
Vorherrschende Sprache
Python
Sterne
152
Forks
16
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus abetlen/ggml-python

Alle Issues in abetlen/ggml-python

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.