Why is coreml so slow on iPhone 6 (A8 processor)

I have a coreml model. It only takes 50ms to run the model on iPhone 7 Plus (A10 Fusion), but it takes ~500ms on iPhone 6 (A8). However, according to the news, A10 Fusion is only 2~3 time faster than A8. Is the coreml on iPhone 6 not so optimised?


Thanks in advance.

Replies

One reason could be that CoreML uses the CPU on the iPhone 6 for your model instead of the GPU. You may be able to find out whether this happens or not by using GPU Frame Capture on the iPhone 6.

That's most definitely the case. I did some benchmarking: on 5s and 6 I get the same execution time with setting usesCPUOnly as without. On A9-devices (and better) the execution time is much slower when only using the CPU.


CoreML most likely require generation 3 GPUs to enable accelleration.