mirror of
https://github.com/ollama/ollama.git
synced 2026-04-23 17:29:54 +02:00
MLX - dynamic loading of mlx-c (#13735)
* MLX - dynamic loading of mlx-c Create a wrapper layer to indirect the dependency on mlx-c so the main ollama binary does not have a load-time dependency on mlx-c, mlx, and on linux, cuda. Lazy load the library via dlopen so we can adjust the path to ensure the dependencies are found and fail gracefully if not present. * review comments * fix broken tests
This commit is contained in:
6
x/imagegen/mlx/doc.go
Normal file
6
x/imagegen/mlx/doc.go
Normal file
@@ -0,0 +1,6 @@
|
||||
//go:build mlx
|
||||
|
||||
// Package mlx provides Go bindings for the MLX-C library with dynamic loading support.
|
||||
//
|
||||
//go:generate go run generate_wrappers.go ../../../build/_deps/mlx-c-src/mlx/c mlx.h mlx.c
|
||||
package mlx
|
||||
Reference in New Issue
Block a user