Native Apple Metal GPU inference via mlx-c bindings
Find a file
Snider f13a8c9289 feat(metal): deterministic Close() and Array.Iter()
Model.Close() now walks the full model tree (Gemma3/Qwen3) and
explicitly frees all weight arrays. Handles tied output weights,
nil safety, idempotent double-close. Helpers: freeLinear,
freeEmbedding, freeRMSNorm, freeCaches, closeGemma, closeQwen3.

Array.Iter() returns iter.Seq[float32] for range-over-func iteration.
Handles non-contiguous arrays and supports early break.

192 tests passing (12 new: 8 close, 4 iter).

Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 21:09:39 +00:00
cpp docs(cpp): add on-demand research tasks for CLion Claude 2026-02-19 21:01:45 +00:00
docs/plans docs(plan): fold Virgil review into design and implementation plan 2026-02-19 19:25:05 +00:00
internal/metal feat(metal): deterministic Close() and Array.Iter() 2026-02-19 21:09:39 +00:00
.gitignore chore: gitignore dist/ (CMake install output) 2026-02-19 19:30:23 +00:00
CLAUDE.md feat(api): migrate to go-inference shared interfaces 2026-02-19 20:15:42 +00:00
CMakeLists.txt feat: extract go-mlx from go-ai as standalone Metal inference package 2026-02-19 17:57:37 +00:00
FINDINGS.md fix(metal): error handling audit — propagate MLX errors instead of swallowing 2026-02-19 20:59:37 +00:00
go.mod feat(api): migrate to go-inference shared interfaces 2026-02-19 20:15:42 +00:00
mlx.go feat(api): migrate to go-inference shared interfaces 2026-02-19 20:15:42 +00:00
mlx_stub.go feat: extract go-mlx from go-ai as standalone Metal inference package 2026-02-19 17:57:37 +00:00
mlx_test.go feat(api): migrate to go-inference shared interfaces 2026-02-19 20:15:42 +00:00
register_metal.go feat(metal): bind memory diagnostics and device info 2026-02-19 20:39:51 +00:00
TODO.md feat(metal): deterministic Close() and Array.Iter() 2026-02-19 21:09:39 +00:00