Native Apple Metal GPU inference via mlx-c bindings
Find a file
Snider df0b300b1a fix(metal): auto-contiguous data access for non-contiguous arrays
Bind mlx_contiguous and _mlx_array_is_row_contiguous from mlx-c.
Floats(), DataInt32(), and Ints() now automatically handle non-contiguous
arrays (from Transpose, BroadcastTo, SliceAxis, etc.) by checking
IsRowContiguous() and making a contiguous copy when needed.

Previously these methods returned silently wrong data for view arrays.
The old workaround of Reshape(arr, totalSize) is no longer needed.

7 new tests for contiguous handling (transpose, broadcast, slice views).

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-19 20:39:36 +00:00
cpp docs(design): backend abstraction with internal/metal reorganisation 2026-02-19 19:12:04 +00:00
docs/plans docs(plan): fold Virgil review into design and implementation plan 2026-02-19 19:25:05 +00:00
internal/metal fix(metal): auto-contiguous data access for non-contiguous arrays 2026-02-19 20:39:36 +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 feat(api): migrate to go-inference shared interfaces 2026-02-19 20:15:42 +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(api): migrate to go-inference shared interfaces 2026-02-19 20:15:42 +00:00
TODO.md feat(api): migrate to go-inference shared interfaces 2026-02-19 20:15:42 +00:00