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

Expose overwrite_descriptor #24

Closed
wants to merge 1 commit into from

Conversation

dcvz
Copy link

@dcvz dcvz commented May 4, 2024

Exposes overwrite_descriptor which is useful for implementing things like add assign - used by python as well.

Comment on lines +251 to +253
/**
* Replaces the array descriptor with that of another array.
*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok exposing this as it is indeed necessary for "in place" bindings. But it might be good to add a little warning to discourage general use. Something like:

Note, this function is only intended for internal use in MLX bindings built with MLX C.

Wdyt?

Copy link
Author

@dcvz dcvz May 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ended up not using this directly because I can directly change pointer location to that of the result of whatever action i'm trying to do (like +=). The note looks good though! What do you suggest? Do we close this until another language binding needs it (we're doing Rust). Or do we add it anyway with this note?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, in that case let's close this. We can always open it if we need this binding in the future.

@awni awni closed this May 23, 2024
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

Successfully merging this pull request may close these issues.

None yet

2 participants