mirror of
https://github.com/ollama/ollama.git
synced 2026-05-13 14:27:00 +00:00
Update MLX and MLX-C with threading fixes (#15845)
* Update MLX and MLX-C * Run MLX CGO work on a locked OS thread MLX now relies on OS-thread-local execution state for streams, encoders, and caches. Add an mlxthread executor backed by runtime.LockOSThread and route runner initialization, model load, inference, status memory reads, and cleanup through the worker so Go goroutine migration cannot split MLX state across native threads. Also stop caching default MLX streams before the runner owns the thread and add worker/threaded MLX regression tests. * mlx: use common status writer * mlx: bundle missing libjaccl on arm64 Inspired by #15793 * review comments
This commit is contained in:
parent
9ba5a04914
commit
534342e7e2
29 changed files with 2122 additions and 279 deletions
|
|
@ -233,9 +233,11 @@ _build_macapp() {
|
|||
cp "$VARIANT$LIB" "$DEST/"
|
||||
fi
|
||||
done
|
||||
# Copy remaining files (metallib) from arm64 v3
|
||||
# Copy remaining files (metallib and auxiliary runtime dylibs)
|
||||
# from arm64 v3. libmlx/libmlxc are handled above so v3 can
|
||||
# be universal when an x86_64 build is available.
|
||||
for F in "$VARIANT"*; do
|
||||
case "$(basename "$F")" in *.dylib) continue ;; esac
|
||||
case "$(basename "$F")" in libmlx.dylib|libmlxc.dylib) continue ;; esac
|
||||
[ -f "$F" ] && [ ! -L "$F" ] || continue
|
||||
cp "$F" "$DEST/"
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue