ShiqiYu / libfacedetection

An open source library for face detection in images. The face detection speed can reach 1000FPS.
Other
12.27k stars 3.05k forks source link

NEON does not compile on ARM #265

Closed mgnbg closed 4 years ago

mgnbg commented 4 years ago

Hello, I am trying to compile on Debian Buster on an dual core CortexA7 Arm. Howver, I get the following error message:

[ 75%] Building CXX object CMakeFiles/facedetection.dir/src/facedetectcnn.cpp.o
In file included from /home/adatis/libfacedetection/src/facedetectcnn.h:60,
                 from /home/adatis/libfacedetection/src/facedetectcnn.cpp:39:
/usr/lib/gcc/arm-linux-gnueabihf/8/include/arm_neon.h: In function ‘int dotProductUint8Int8(unsigned char*, signed char*, int)’:
/usr/lib/gcc/arm-linux-gnueabihf/8/include/arm_neon.h:6733:1: error: inlining failed in call to always_inline ‘int32x4_t vdupq_n_s32(int32_t)’: target specific option mismatch
 vdupq_n_s32 (int32_t __a)
 ^~~~~~~~~~~
/home/adatis/libfacedetection/src/facedetectcnn.cpp:93:29: note: called from here
     result_vec = vdupq_n_s32(0); //zeros
                  ~~~~~~~~~~~^~~

There is a whole list of errors. Above is just the first. Has this been tested to work on ARMV7 ?

ShiqiYu commented 4 years ago

Did you enable NEON of the compiler when you compiled it?

On Thu, Jul 30, 2020 at 9:55 PM mgnbg notifications@github.com wrote:

Hello, I am trying to compile on Debian Buster on an dual core CortexA7 Arm. Howver, I get the following error message:

[ 75%] Building CXX object CMakeFiles/facedetection.dir/src/facedetectcnn.cpp.o

In file included from /home/adatis/libfacedetection/src/facedetectcnn.h:60,

             from /home/adatis/libfacedetection/src/facedetectcnn.cpp:39:

/usr/lib/gcc/arm-linux-gnueabihf/8/include/arm_neon.h: In function ‘int dotProductUint8Int8(unsigned char, signed char, int)’:

/usr/lib/gcc/arm-linux-gnueabihf/8/include/arm_neon.h:6733:1: error: inlining failed in call to always_inline ‘int32x4_t vdupq_n_s32(int32_t)’: target specific option mismatch

vdupq_n_s32 (int32_t __a)

^~~

/home/adatis/libfacedetection/src/facedetectcnn.cpp:93:29: note: called from here

 result_vec = vdupq_n_s32(0); //zeros

              ~~~~~~~~~~~^~~

There is a whole list of errors. Above is just the first. Has this been tested to work on ARMV7 ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ShiqiYu/libfacedetection/issues/265, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABWR4HPFNTVCJX33MLJVPRDR6F3VVANCNFSM4PNZX5VA .

--

Prof. Shiqi YU (于仕琪)

Department of Computer Science and Engineering,

Southern University of Science and Technology,

Shenzhen, China.

mgilge commented 4 years ago

I checked the CMakefile and there were not compiler options set. I assumed that the NEON option would take care of that. Now it compiles. Thank you for you kind hint.