spinsphotonics / fdtdz

Fast, scalable, accessible photonic simulation
MIT License
114 stars 13 forks source link

OSX M1, M2 support? #22

Open lukasc-ubc opened 1 year ago

lukasc-ubc commented 1 year ago

Hello,

I am wondering if fdtd-z works on Mac OSX M1 or M2 computers running the ARM64 processor?

The CUDA toolkit is required, and it sounds like it is not completely supported: link. Namely, there is no NVIDIA GPU in the AMD apple computers...

Mac has Metal for ML tasks, and supports Jax. I wonder if that could be used? https://developer.apple.com/metal/jax/

jlu-spins commented 1 year ago

Hi Lukas!

Unfortunately, the implementation of fdtd-z is very intimately tied to the architecture of Nvidia GPUs. Even if fdtd-z could somehow run on other platforms, there would be virtually no chance that it would be performant.

On Thu, Oct 12, 2023 at 10:16 PM Lukas Chrostowski @.***> wrote:

Hello,

I am wondering if fdtd-z works on Mac OSX M1 or M2 computers running the ARM64 processor?

The CUDA toolkit is required, and it sounds like it is not completely supported: link https://developer.nvidia.com/nvidia-cuda-toolkit-11_6_0-developer-tools-mac-hosts. Namely, there is no NVIDIA GPU in the AMD apple computers...

Mac has Metal for ML tasks, and supports Jax. I wonder if that could be used? https://developer.apple.com/metal/jax/

— Reply to this email directly, view it on GitHub https://github.com/spinsphotonics/fdtdz/issues/22, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3VGPQMGG72UAN7H4FNRIIDX7DFCZAVCNFSM6AAAAAA56S7B2CVHI2DSMVQWIX3LMV43ASLTON2WKOZRHE2DCMRVGQZDSMY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

lukasc-ubc commented 1 year ago

Thanks Jesse,

I came across a Mac Metal implementation of FDTD. It looks like this CPU/GPU is quite promising in terms of performance: https://github.com/ProteusMRIgHIFU/BabelViscoFDTD https://github.com/ProteusMRIgHIFU/BabelViscoFDTD

joamatab commented 12 months ago

Hi Lukas,

i found the easiest way to run fdtdz is using Google Colab

@devbrones