ml-explore / mlx

MLX: An array framework for Apple silicon
https://ml-explore.github.io/mlx/
MIT License
14.83k stars 845 forks source link

Added ArcTan2 operation #1079

Closed yrahul3910 closed 1 week ago

yrahul3910 commented 2 weeks ago

Proposed changes

This PR adds the arctan2 operation, as discussed in #1065.

Checklist

Put an x in the boxes that apply.

yrahul3910 commented 1 week ago

Thanks! Is that linux build supposed to pass? It seems like it's mainly having trouble finding the ArcTan2 symbol and I'm not sure what I missed.

awni commented 1 week ago

Yes, linux tests should pass. I think you just need to add to the list here: https://github.com/ml-explore/mlx/blob/main/mlx/backend/common/default_primitives.cpp#L36

That is just a way of saying that we should just use the default eval when accelerate is not available (e.g. on linux).