ml-explore / mlx

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

Allow conversion to dlpack #1120

Closed awni closed 2 weeks ago

awni commented 2 weeks ago

Closes #1080

justinchuby commented 2 weeks ago

Is __dlpack_device__() needed?

awni commented 2 weeks ago

Is it needed by you? Array's don't have devices in MLX they live in shared memory accessible to both CPU/GPU.. so it doesn't really make sense to have it.

But for interop purposes we could add it and return like the default device (usually METAL) if that's useful.

justinchuby commented 2 weeks ago

I remember seeing frameworks raising errors when the method was not implemented.