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

Feature request: GPU support in MacOS

Open moshialam opened this issue 2 years ago • 2 comments

Hi The new Macs have quite a few GPUs which can be used to make computation orders of magnitude faster. However the current support of FixedEffects.jl only works with NVIDIA GPUs. Are there plans in the near future to make use to the GPUs in Macs? It will be extremely useful! Thanks!

moshialam avatar Jan 29 '23 16:01 moshialam

Agreed! However, Metal.jl does not support atomics yet (i.e. the atomic_add! function, which is at the core of the algorithm). I will have another look once it does. See https://github.com/JuliaGPU/Metal.jl/issues/79

matthieugomez avatar Jan 31 '23 15:01 matthieugomez

The package now supports Mac GPUs it but it ends up being slower than CPUs. If anyone is interested in making this faster, the relevant code is https://github.com/FixedEffects/FixedEffects.jl/blob/master/ext/MetalExt.jl

matthieugomez avatar Aug 20 '23 15:08 matthieugomez