MPS device/MAC GPU
timmyL17 opened this issue · 1 comments
timmyL17 commented
How hard would it be to enable the Mac M1/M2 GPU devices in phiflow? It seems that phiflow currently only searches the cuda backend for devices. Are the phiflow cuda kernels only used for tensorflow? Maybe it could allow the MPS backend in pytorch, if pytorch already includes kernels for grid interpolation?
holl- commented
You can use the GPU even without the custom CUDA kernels. If you get either TensorFlow, PyTorch or Jax to recognize the GPU, you can simply select that backend using the corresponding phi.<backend>.flow
import and you're good to go. You can check whether the GPU is recognized using
import phi; phi.verify()