You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am very excited that MLX currently supports mx.float64 on CPU. I know that Metal does not support float64. However, I believe it can be added with software emulation. It would be extremely helpful to optimization and inverse design problems to add this feature. float32 is just not enough for simulating physics (for example, optical ray tracing, image processing, VR simulations) and running large data on the CPU is slow.
In my opinion, having an option to run float64 on GPU is the one of the remaining big differences between PyTorch and MLX. I've mainly switched to MLX, but running into accuracy errors because of float32 is starting to be more of an issue.
Thank you
The text was updated successfully, but these errors were encountered:
Emulating FP64 on the GPU is going to be quite slow and there's a good chance it will wipe out any speed improvements you might expect from running on the GPU.
I think your best bet for running locally in higher precision is:
Find a way to make the CPU faster. If there are specific ops that are slow, file an issue and we can look into speeding them up.
Offload parts of your computation that can be lower precision (hopefully large matrix multiplies) to the GPU and then run the higher precision stuff on the CPU.
What I meant by that is any framework that uses an Apple gpu wiil have the same problem including PyTorch's MPS back-end (which does not support double for the same reason).
Hello,
I am very excited that MLX currently supports
mx.float64
on CPU. I know that Metal does not support float64. However, I believe it can be added with software emulation. It would be extremely helpful to optimization and inverse design problems to add this feature.float32
is just not enough for simulating physics (for example, optical ray tracing, image processing, VR simulations) and running large data on the CPU is slow.In my opinion, having an option to run float64 on GPU is the one of the remaining big differences between PyTorch and MLX. I've mainly switched to MLX, but running into accuracy errors because of float32 is starting to be more of an issue.
Thank you
The text was updated successfully, but these errors were encountered: