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

Metal GPU acceleration on Apple Silicon

Open BooBSD opened this issue 5 years ago • 5 comments

Hello,

I have a question. Do you plan to support Metal GPU acceleration on Apple Silicon in future?

Thank you.

BooBSD avatar Aug 05 '20 08:08 BooBSD

See my answer to a this question at https://github.com/FluxML/Flux.jl/pull/938#issuecomment-703179045

jpsamaroo avatar Nov 18 '20 15:11 jpsamaroo

Pardon my ignorance, does that mean that once you get Flux working with AMD GPUs, support for Metal will come with it?

Eugleo avatar Feb 05 '22 14:02 Eugleo

No, it will not. Apple's Metal stack is completely separate from AMD's ROCm stack, so it will require a full new implementation in Julia (see https://github.com/JuliaGPU/Metal.jl).

jpsamaroo avatar Feb 05 '22 14:02 jpsamaroo

I’ve seen this, I’m not sure whether it’s under active development (last commit in Nov), and what it (at least roughly) means time-wise for Flux on Apple Sillicon. Is it months away? Or more than a year? The readme doesn’t say much beyond “only interesting to developers”.

Eugleo avatar Feb 05 '22 15:02 Eugleo

Flux on Apple silicon is a different topic altogether. The library has worked on Rosetta for a while, and (depending on the state of native ARM support in base Julia) may work natively too.

My understanding of the timeline on Metal.jl is "expect nothing, unless you can contribute for find a way to get us proper development resources". Remember that getting the base library working is only the first part of getting it working with Flux. You may have to write an entire NN kernel lib from scratch since I'm not sure apple provides one for GPU.

ToucheSir avatar Feb 05 '22 17:02 ToucheSir