FixedEffects / FixedEffectModels.jl

Fast Estimation of Linear Models with IV and High Dimensional Categorical Variables
Other
225 stars 46 forks source link

Feature request: GPU support in MacOS #217

Closed moshialam closed 5 months ago

moshialam commented 1 year ago

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!

matthieugomez commented 1 year ago

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 commented 1 year ago

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