ComputeLibrary icon indicating copy to clipboard operation
ComputeLibrary copied to clipboard

the performance of computeLibrary on armv7a

Open szavc opened this issue 9 years ago • 9 comments

Does anybody knows how to use computeLibrary to accelerate machine learning such as compute hog feature with computeLibrary? Who can give some examples ?there would be helpful,thanks. And there is another problem.When I tested convolution with computeLibrary and opencv library,I found that it was even slower while using computeLibrary than using opencv library.So it really confused me.

szavc avatar Jun 08 '17 04:06 szavc

There are some examples in the examples folder, you can also have a look at the other issues here on Github for more. The compute library should be much faster than OpenCV, make sure you compile with asserts=0 and debug=0 when you want to measure time. Don't forget to set your CPU to performance mode and force_number_of_threads() to match the number of big cores you have on your system (Assuming this is a big LITTLE configuration)

AnthonyBarbier avatar Jun 08 '17 07:06 AnthonyBarbier

Regarding HOG: we will publish a blog post about how to use HOG / SVM in a few weeks.

AnthonyBarbier avatar Jun 08 '17 07:06 AnthonyBarbier

@AnthonyARM : Thanks for your suggestion.I have tried your advice, when I compile ComputeLibrary with :scons Werror=1 -j8 debug=0 asserts=0 neon=1 opencl=0 os=linux build=native arch=armv7a ,it has following problems: In file included from ./arm_compute/core/Window.h:334:0, from ./arm_compute/core/Helpers.h:32, from src/core/ITensor.cpp:27: ./arm_compute/core/Window.inl: In member function 'void arm_compute::ITensor::copy_from(const arm_compute::ITensor&)': ./arm_compute/core/Window.inl:43:27: error: array subscript is above array bounds [-Werror=array-bounds] _dims[dimension] = dim; ^ ./arm_compute/core/Window.inl:43:27: error: array subscript is above array bounds [-Werror=array-bounds] _dims[dimension] = dim; ^ cc1plus: all warnings being treated as errors scons: *** [build/arm_compute/src/core/ITensor.o] Error 1 scons: building terminated because of errors.

When I change compile command as:scons Werror=0 -j8 debug=0 asserts=0 neon=1 opencl=0 os=linux build=native arch=armv7a ,the compilation process finished.And I use the generate so files to compile my project to test convolution time between CompileLibrary and opencv library. The result was the same as before. Are there any compile options that I didn't make correctly?

szavc avatar Jun 08 '17 08:06 szavc

@AnthonyARM By the way, my code runs on arm Cortex-A7 . Appreciate for your help.

szavc avatar Jun 08 '17 12:06 szavc

Your compilation options look good, the problem might come from your platform configuration: if you have a big LITTLE platform you need to make sure to disable the small cores, and set the big cores to the maximum frequency, etc.

AnthonyBarbier avatar Jun 13 '17 12:06 AnthonyBarbier

Any update on the HOG/SVM example?

qingswu avatar Jul 07 '17 04:07 qingswu

Hi @qingswu ,

we are in the process of writing a blog post which will explain step by step how to use OpenCV to get the model and how to use our HOG/SVM for implementing a traditional computer vision pipeline for doing object detection.

We will let you know once will be published.

Thanks

gmiodice avatar Jul 07 '17 07:07 gmiodice

Hi @AnthonyARM,

where can I find the blog on HOG?

Best wishes

krjw avatar Jun 25 '18 09:06 krjw

Closing as duplicate of #129

GeorgeARM avatar Oct 15 '18 14:10 GeorgeARM