Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug with as_slice when the underlying array is not contiguous #77

Open
Tracked by #35
minghuaw opened this issue Jun 18, 2024 · 1 comment
Open
Tracked by #35

Comments

@minghuaw
Copy link
Collaborator

minghuaw commented Jun 18, 2024

see ml-explore/mlx-swift#96

@minghuaw
Copy link
Collaborator Author

as_slice here is closer to asData in the swift binding than asArray.

Similar to the situation with performing implicit conversion for as_slice, a new continuous copy is created implicitly in the swift binding. This makes the lifetime of the newly created underlying buffer rather complicated, and maybe the equivalent of asArray in the swift binding should not be implemented.

TODO:

  • We should document that as_slice is not equivalent to asArray

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant