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

Oceananigans on AMD GPUs

Open tomchor opened this issue 4 years ago • 3 comments

It looks like KernelAbstractions.jl has added experimental support for AMD: https://github.com/JuliaGPU/KernelAbstractions.jl/releases/tag/v0.6.0

Should we try to make the code more GPU-architecture-agnostic based on that? From what I've heard, end-user level AMD GPUs are generally cheaper than Nvidia ones for similar performance. So running Oceananigans on AMD could potentially make it significantly easier for people to run simulations on their personal computer instead of a cluster.

tomchor avatar Apr 05 '21 17:04 tomchor

Thanks for sharing this @tomchor .

Do I take that to mean that if we try and run Oceananigan on an AMD GPU then very likely the code will fail because KerelAbstractions.jl (and possibily others) will fail?

It would be great to be able to run the library on any GPU but I guess a lot of this depends on KerenAbstractions, and other libraries. Do people know what other libraries we depend on that would not necessary run on AMD GPUs?

francispoulin avatar Apr 05 '21 17:04 francispoulin

I don't know a lot about this (@ali-ramadhan and @glwagner can give you a much clearer picture) but I think up until last week KernelAbstractions.jl straight up didn't support AMD. It relied on defining CUDAKernels which are specific to Nvidia GPUs. Now I believe they also added ROCKernels, that are meant to take care of the AMD case.

However I think we still need some work on our end since Oceananigans imports CUDA and uses some CUDA-specific functions in lots of places. I think something needs to be done in these instances.

tomchor avatar Apr 05 '21 18:04 tomchor

Agree that AMD may indeed be the future and we should take a look at this soon.

glwagner avatar Apr 06 '21 04:04 glwagner