projectNe10 / Ne10

An open optimized software library project for the ARM® Architecture

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ne10 FFT usage in AARCH32 and AARCH64 bit architecture gives different CPU cycles.

Nanthakumar54 opened this issue · comments

I am using Ne10 library for FFT function in ARMv8-a architecture.
Initially i was building Ne10 library in AARCH32 bit mode.
It gives good performance in terms of CPU cycles.
But when i used AARCH64 bit mode for building I didn't get same performance in terms of CPU cycles.
AARCH64 will give better performance than AARCH32 bit mode Right?
Could you please help me why i am getting this behavior or am i missing something while compiling

Details,
function used : ne10_fft_c2c_1d_float32_neon() /complex FFT called from main.c file/
block size : 65536 complex samples
ne10/src/ list of source files
NE10_fft_int32.c
NE10_fft_generic_int32.cpp
NE10_fft_generic_float32.c
NE10_fft_float32.c
NE10_fft_float32.neonintrinsic.c
NE10_fft_generic_float32.neonintrinsic.cpp
NE10_fft.c
ne10/inc/ list of header files
NE10_types.h
NE10_physics.h
NE10_math.h
NE10_macros.h
NE10_init.h
NE10_imgproc.h
NE10.h
NE10_fft.neonintrinsic.h
NE10_fft.h
NE10_fft_generic_int32.h
NE10_fft_generic_float32.h
NE10_fft_debug_macro.h
NE10_fft_cplx_ops.h
NE10_fft_common_varibles.h
NE10_fft_bfly.h
NE10_dsp.h

				**makefile used for AARCH32 bit mode**

ARM_TOOLCHAIN=${ANDROID_NDK}/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin
CC = ${ARM_TOOLCHAIN}/arm-linux-androideabi-gcc
CPP = ${ARM_TOOLCHAIN}/arm-linux-androideabi-g++
CFLAGS = -g -ggdb -Wall -O3 -Wall -Wextra -march=armv8-a -mthumb -mfloat-abi=softfp -mfpu=neon-vfpv4 -ftree-vectorize -ffast-math --sysroot $(ANDROID_NDK)/platforms/android-27/arch-arm -pie -fno-exceptions -Wno-attributes
LIBS = -lm -lstdc++
LOCAL_INCLUDE := . ../inc ../ne10/inc ${HOME}/Android/Sdk/ndk-bundle/sysroot/usr/include ${HOME}/Android/Sdk/ndk-bundle/sysroot/usr/include/x86_64-linux-android ${HOME}/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include ${HOME}/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include
LOCAL_INCLUDE := $(addprefix -I, $(LOCAL_INCLUDE))

build_all:
$(CPP) $(LOCAL_INCLUDE) $(CFLAGS) -o ne10_out $(PROJ)/ne10/src/.cpp $(PROJ)/ne10/src/.c $(PROJ)/src/*.c $(LIBS)

				**makefile used for AARCH64 bit mode**

ANDROID_NDK=${HOME}/Android/Sdk/ndk-bundle
ARM_TOOLCHAIN=${ANDROID_NDK}/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin
CC = ${ARM_TOOLCHAIN}/aarch64-linux-android-gcc
CPP = ${ARM_TOOLCHAIN}/aarch64-linux-android-g++
CFLAGS = -g -ggdb -Wall -O3 -mstrict-align -Wall -Wextra -march=armv8-a -ftree-vectorize -ffast-math -mabi=lp64 --sysroot $(ANDROID_NDK)/platforms/android-27/arch-arm64 -pie -fno-exceptions -Wno-attributes
LIBS = -lm -lstdc++
LOCAL_INCLUDE := . ../inc ../ne10/inc ${HOME}/Android/Sdk/ndk-bundle/sysroot/usr/include ${HOME}/Android/Sdk/ndk-bundle/sysroot/usr/include/x86_64-linux-android ${HOME}/Android/Sdk/ndk-bundle/sysroot/usr/include/aarch64-linux-android ${HOME}/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include ${HOME}/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/include
LOCAL_INCLUDE := $(addprefix -I, $(LOCAL_INCLUDE))

build_all:
$(CPP) $(LOCAL_INCLUDE) $(CFLAGS) -o ne10_out $(PROJ)/ne10/src/.cpp $(PROJ)/ne10/src/.c $(PROJ)/src/*.c $(LIBS)

Could you please help me why i am getting this behavior or am i missing something while compiling.