mlx
mlx copied to clipboard
Add int64 reductions
Ran into an issue with the sum function when using int64.
the following runs ok
import mlx.core as mx
y = mx.ones((70), dtype=mx.int32)
mx.sum(y)
the following crashes every time on my MacBook Pro M3 Pro / 18GB
import mlx.core as mx
y = mx.ones((70), dtype=mx.int64)
mx.sum(y)
with error message "libc++abi: terminating due to uncaught exception of type std::runtime_error: [Reduce::eval_gpu] Does not support int64"
can you confirm this is intended behaviour? or if it something that is planned for a future version?
Yes, int64 is not yet supported in our reductions, that's expected. It's definitely possible to add, but not the highest priority at the moment. Happy to take a contribution for this though if someone is interested in adding it!
@awni we can close this now.
Thanks @vj-krish !!
Fixed in #569.