coreml-performance
coreml-performance copied to clipboard
Simulator doesn't use ANE on M1 macbook air
In case other people try to run the CoreML performance test on M1 macbook air in the simulator, it appears that CoreML doesn't use the ANE. When I run the benchmark on iPhone 12 mini, I get good results
densenet121_keras_applications Latency ANE: 0.0036488929166225716 RPS ANE: 274.0557267231628
densenet121_keras_applications Latency GPU: 0.0613862985833548 RPS GPU: 16.290280128913896
densenet121_keras_applications Latency CPU: 0.023476493666647003 RPS CPU: 42.59579876788405
When I run it in iPhone 13 pro simulator. I get the following results.
densenet121_keras_applications Latency ANE: 0.03300754233333282 RPS ANE: 30.296105959701983
densenet121_keras_applications Latency GPU: 0.03313355749999755 RPS GPU: 30.180882327533766
densenet121_keras_applications Latency CPU: 0.03288246091666224 RPS CPU: 30.411349154627256
The macbook air specs 16G memory Xcode 13.0 (12a233) MacOS 11.6 Chip M1 512 SSD
This isn't really a bug, just sharing results for those that are interested.
I've read that depending on how a specific model is optimized and other factors, it may never be used on the ANE (hoping to test this out myself). Even on a real device this may be the case.
But for simulators this might make sense, I can't imagine those would make use of your macbook's ANE as if it was a real device, not sure on that. Thanks for sharing though now I'll be looking at my macbook's usage when running CoreML in simulators.