Current state of Metal.jl for ML and SciML

How feasible is using Apple Metal and Metal.jl for machine learning work? Metal.jl’s README says

The package is a work-in-progress. There are bugs, functionality is missing, and performance hasn’t been optimized. Expect to have to make changes to this package if you want to use it. PRs are very welcome!

But I’d like to hear some personal experiences before I dive into it. Has anyone used it for large-scale applications? How much more work was it?

1 Like

I would also like to know (replying so I get notified)

My experience (~6 month ago): I tried to switch to Metal.jl as a backend for a transformer model I was tinkering with (that worked great with CUDA.jl). It didn’t work “out the box” with Metal.jl, but I got it working by defining some new methods (from NNlib.jl functions) for MtlArrays. Then it ran and gave correct output but, depending on the use case, was either only slightly faster than the CPU, or much much slower than the CPU. That is where I stopped.

6 Likes