ARM-software / armnn

Arm NN ML Software. The code here is a read-only mirror of https://review.mlplatform.org/admin/repos/ml/armnn
https://developer.arm.com/products/processors/machine-learning/arm-nn
MIT License
1.17k stars 309 forks source link

Where are benchmarks supporting the claim of being the most performant ML inference engine #661

Closed bojeckkk closed 2 years ago

bojeckkk commented 2 years ago

As per README:

Arm NN is the most performant machine learning (ML) inference engine for Android and Linux, accelerating ML on Arm Cortex-A CPUs and Arm Mali GPUs.

Are there any benchmarks supporting the statement? From my initial findings it seems to perform much slower (40-50%) than TFLite with XNNPack when it comes to Conv2d nodes (On A52/A53 CPUs). It even seems to be slower than plain TFLite by 10%. I do not have separated test cases for now, but most of the time my model spends on Conv2d.

EDIT: I'm running binaries built for armv7 32-bit

psyhtest commented 2 years ago

Hey @MrSherish, is MLPerf Inference good enough for you? :) We typically find that ArmNN with NEON performs better than TFLite, although not for all models across all platforms.

I will not vouch we use the best build options for TFLite though. At some point (~v2.3?) they introduced support for CMake, but it has been broken since v2.8.

liamsun2019 commented 2 years ago

Also curious about the performance on some classical network. As far as I know, some similar frameworks such as TNN, MNN, provide detailed data about performance. I have not yet found such information for ARMNN.

morgolock commented 2 years ago

I'm running binaries built for armv7 32-bit

I'd suggest you move to aarch64 if possible. You will get much better performance if you build for armv8 or newer architectures.

The armv7a code is not as highly optimized as aarch64.

Hope this helps.

bojeckkk commented 2 years ago

Unfortunately I am currently limited to armv7a binaries exclusively.

bojeckkk commented 2 years ago

Thank you @psyhtest , the link you provided should do for now.

bojeckkk commented 2 years ago

The difference is even worse for arm64 using same model - ArmNN performs 9 times slower than XNNPack

MatthewARM commented 2 years ago

Thanks @MrSherish can you attach the model? Something must be broken.