High CPU usage and latency on aarch64 ARMV8 build #4723
Unanswered
andrewtabarez
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I am running into high latency and constant high CPU usage (80-95% ) when running a ARMv8 build on my Samsung Note 10. To test bench this I am running various matrix unit tests. The armv7 build runs fast and shows moderate CPU usage when compared to this armv8 build so I am wondering if I am missing a certain configuration during build. Below are benchmarks to compare the armv8 and armeabi-v7a builds running the exact same code. My best guess on the high CPU usage is some thread locking issue for some reason, though I don't have anything substantial to back that up.
BUILD INSTRUCTIONS I USED:
ARMV8 build (android-ndk-r18b-2022) (version 0.3.27.dev)
make TARGET=ARMV8
CC=$TOOLCHAIN_BIN/aarch64-linux-android-gcc
AR=$TOOLCHAIN_BIN/aarch64-linux-android-ar
FC=$TOOLCHAIN_BIN/aarch64-linux-android-gfortran
HOSTCC=gcc
-j4
(I have tried building with no threads / threads/ affinity on,off / locking / lots of threads / 1 thread) (these are defined in the Makefile.rule file, no difference here on CPU usage)
=================================================================
armeabi-v7a build (android-ndk-r14b) (version 0.3.0.dev)
make HOSTCC=gcc
CC="$COMPILERDIR/arm-linux-androideabi-gcc --sysroot=$SYSROOT"
FC="$COMPILERDIR/arm-linux-androideabi-gfortran --sysroot=$SYSROOT"
TARGET=ARMV7
CROSS_SUFFIX=$COMPILERDIR/arm-linux-androideabi-gcc-
FCOMMON_OPT=-frecursive
ARM_SOFTFP_ABI=1 \
=================================================================
BENCHMARKS (Bolded are some tests that differ wildly between 64 and 32 bit builds)
attached are android studio profile snippets showing that CPU usage is so much higher on the ARMv8 64bit builds)
ARMv8
64 bit
UnitTestRealFftSpeed,float,512,0.126857,seconds
UnitTestSplitRadixRealFftSpeed,float,512,0.0719979,seconds
UnitTestSvdSpeed,float,4,39.363,seconds
UnitTestAddMatMatSpeed,float,2,1.87856,seconds
UnitTestAddRowSumMatSpeed,float,5,0.228737,seconds
UnitTestAddColSumMatSpeed,float,5,0.30996,seconds
UnitTestAddVecToRowsSpeed,float,5,0.221573,seconds
UnitTestAddVecToColsSpeed,float,5,0.259116,seconds
UnitTestRealFftSpeed,double,512,0.140171,seconds
UnitTestSplitRadixRealFftSpeed,double,512,0.098691,seconds
UnitTestSvdSpeed,double,4,32.5623,seconds
UnitTestAddMatMatSpeed,double,2,4.06978,seconds
UnitTestAddRowSumMatSpeed,double,5,0.222114,seconds
UnitTestAddColSumMatSpeed,double,5,0.205234,seconds
UnitTestAddVecToRowsSpeed,double,5,0.240473,seconds
UnitTestAddVecToColsSpeed,double,5,0.162261,seconds
As you can see the CPU usage is pinned above 90%.
armeabi-v7a
32bit
UnitTestRealFftSpeed,float,512,0.0684619,seconds
UnitTestSplitRadixRealFftSpeed,float,512,0.0363259,seconds
UnitTestSvdSpeed,float,4,4.70356,seconds
UnitTestAddMatMatSpeed,float,2,0.76346,seconds
UnitTestAddRowSumMatSpeed,float,5,0.140093,seconds
UnitTestAddColSumMatSpeed,float,5,0.142121,seconds
UnitTestAddVecToRowsSpeed,float,5,0.146741,seconds
UnitTestAddVecToColsSpeed,float,5,0.145406,seconds
UnitTestRealFftSpeed,double,512,0.0561302,seconds
UnitTestSplitRadixRealFftSpeed,double,512,0.0310419,seconds
UnitTestSvdSpeed,double,4,7.92912,seconds
UnitTestAddMatMatSpeed,double,2,0.883866,seconds
UnitTestAddRowSumMatSpeed,double,5,0.152569,seconds
UnitTestAddColSumMatSpeed,double,5,0.160446,seconds
UnitTestAddVecToRowsSpeed,double,5,0.148019,seconds
UnitTestAddVecToColsSpeed,double,5,0.147486,seconds
CPU usage varies but usually under 50%
Any help here would be greatly appreciated! If more info is needed, I will gladly post it.
Beta Was this translation helpful? Give feedback.
All reactions