Daniel Strobusch
Daniel Strobusch
Even better: `__array__` could be removed altogether. There is only the edge case of auto conversion from `bfloat16` to `float32`. But it might be better to do this explicitly anyway....
Let me check some details and add some test cases, then I'll turn the draft into a PR for review.
PR is ready for review. Looking forward to your feedback. > One thing I'm wondering is what is the expected behavior when the mx.array goes out of scope [...] Is...
> If instead you were simply returning x @ x as in function f, then you would get the correct gradient. And that is way more confusing than getting 0s....
> Putting MLX writeable array buffers into black box APIs seems risky in general. Could you elaborate on your specific concerns? Furthermore, it would be valuable to discuss the recommended...
> @dastrobu we discussed a bit offline and the conclusion was that we can keep buffers writable (as you have it). We'll see how it goes, if there are some...
> I left a couple of minor comments there could you take a look? Thanks, everything should be resolved now.
Gave it a quick shot in #323. There are some little edge cases, see inline comments in the draft PR.
Thanks for your comment. I think it does not really matter as you can convert lists and tuples very easily and performance shouldn't really matter when dealing with shapes. Having...
Here are additional benefits of employing an immutable type, such as a tuple, for representing shape: 1. the empty tuple can be a singleton. That means for 0d arrays, the...