ComputeLibrary icon indicating copy to clipboard operation
ComputeLibrary copied to clipboard

Execution time for a single NEConvolutionLayer

Open joel-mi opened this issue 9 years ago • 5 comments

We are running NEConvolutionLayer on processor ArmCortex A53, and clocks set as follows : echo 1586000 > /sys/devices/system/cpu/cpufreq/mp-cpufreq/cluster0_min_freq echo 2704000 > /sys/devices/system/cpu/cpufreq/mp-cpufreq/cluster1_min_freq echo 650 > /sys/devices/14ac0000.mali/dvfs_min_lock echo 1794000 > /sys/class/devfreq/17000010.devfreq_mif/min_freq

This layer consists of :

  • input size = 32x32x3
  • output size = 32x32x40
  • kernel size = 3 --> weights size = 3x3x3x40
  • with bias --> bias size = 40 We measured the elapsed time for NEConvolutionLayer.run, it was 23792 microseconds - that's a lot of time, much longer than what we get when using a proprietary framework instead of Arm Compute Library. Did you observe similar execution times in your environment ? Maybe there is some optimization that we are missing ?

joel-mi avatar May 09 '17 11:05 joel-mi

Hello @joel-mi,

how are you building the library? What is your build command?

GeorgeARM avatar May 09 '17 12:05 GeorgeARM

scons.bat Werror=1 -j8 debug=1 asserts=1 neon=1 opencl=0 embed_kernels=0 os=android arch=arm64-v8a

joel-mi avatar May 09 '17 12:05 joel-mi

Hello @joel-mi,

So when we want to measure performance we have to build the library with debug=0 and asserts=0. Moreover make sure you program is also compiled with -O3 for better results. In addition when you do the performance measurements, run more than 1 iterations (10 for example) and take the average as usually the first run is slower that the others due to some initializations taking place. Hope this helps.

GeorgeARM avatar May 09 '17 12:05 GeorgeARM

hello George I indeed observed a dramatic improvement when setting debug=0 and asserts=0 Instead of 23.7 ms for a single convolution layer run, the elapsed time is now between 3.5 and 5 ms Many thanks !

joel-mi avatar May 10 '17 10:05 joel-mi

Glad to hear! Closing this issue! Feel free to open if required!

GeorgeARM avatar May 10 '17 10:05 GeorgeARM