Native Apple Metal GPU inference via mlx-c bindings
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> |
||
|---|---|---|
| cpp | ||
| docs/plans | ||
| internal/metal | ||
| .gitignore | ||
| CLAUDE.md | ||
| CMakeLists.txt | ||
| FINDINGS.md | ||
| go.mod | ||
| mlx.go | ||
| mlx_stub.go | ||
| mlx_test.go | ||
| register_metal.go | ||
| TODO.md | ||