NeuralPDE.jl icon indicating copy to clipboard operation
NeuralPDE.jl copied to clipboard

Multi-GPU and distributed demonstrations of PINNs

Open ChrisRackauckas opened this issue 3 years ago • 7 comments

Multi-GPU should "just work" through distributed, so we should make sure to have a demo of this.

ChrisRackauckas avatar Sep 03 '20 18:09 ChrisRackauckas

@leios would it be a good idea to use Clima tools here, or build something off of distributed arrays of CuArrays?

ChrisRackauckas avatar Sep 03 '20 18:09 ChrisRackauckas

What is the status of multi-GPU support for PINNs?

killah-t-cell avatar Oct 20 '21 14:10 killah-t-cell

It should just work. Try it.

ChrisRackauckas avatar Oct 20 '21 16:10 ChrisRackauckas

@ChrisRackauckas Do you have a specific example? I am sorry I can not find any tutorial or example code in NeuralPDE.jl repository. Have I been missing something?

udemirezen avatar Nov 01 '21 06:11 udemirezen

It's not a NeuralPDE thing, it's just a Flux thing. If the neural network is multi-GPU then the PINN will be multi-GPU. We can make a tutorial here to help people out, but you won't need a tutorial to do it.

CUDA.jl describes how to setup multiple GPUs here: https://fluxml.ai/Flux.jl/stable/gpu/ Multiple GPU nets are defined in: https://github.com/DhairyaLGandhi/DaggerFlux.jl

Stick those into NeuralPDE and you got gold.

ChrisRackauckas avatar Nov 01 '21 14:11 ChrisRackauckas

Thank you very much for the information

udemirezen avatar Nov 03 '21 07:11 udemirezen

Note that performance on multiple GPUs and/or multiple processes will be poor until https://github.com/JuliaGPU/DaggerGPU.jl/pull/17 is merged (planning that for the end of this week), but things should still function correctly without it.

jpsamaroo avatar Nov 03 '21 18:11 jpsamaroo