Does CoreML use Metal?

Hi. Thanks for the great library that simplifies running CNN on the phone by a ton. I do wonder if the current

version of CoreML is using Metal to run the network. I notice the perfomance is just on par with one of our own

metal port and when I profile using the metal system trace I actually didn't see any metal activity but only

CPU bursts. Just curious if the current version is using metal at all.

Thanks.

Peter

Yes, it does. What's the phone/pad you are testing on?

hmm it's an iphone 7 plus. Probably it's the profiler that isn't monitoring right?

I haven't had much luck with getting Metal System Trace to show anything happening in a Core ML app, and only a bit more luck with GPU Frame Capture (you need to create a MTLCaptureSession first).


I've also seen someone report that Core ML sometimes choses to run their model on the CPU instead of the GPU, even though the GPU would be the better choice here. (It depends on the model, no doubt.)


However... when you say "I notice the perfomance is just on par with one of our own metal port", then I'm not sure what you were expecting. Core ML isn't going to be any faster than your Metal code (especially if you're using the MPSCNN* classes to do all the work).

Hi Peter,


If possible, can you kindly attach your model using bugreport.apple.com? We want to make sure that Core ML is dispatching to the right hardware.


-gaurav

hmm yeah in theory. My experience is just Apple has a great optimization team and probably utilizing Metal smarter then us (parallel encoding etc).

Does CoreML use Metal?
 
 
Q