pytorch / QNNPACK

Quantized Neural Network PACKage - mobile-optimized implementation of quantized neural network operators
https://code.fb.com/ml-applications/qnnpack/
Other
1.52k stars 219 forks source link

Build failed on rasp pi 4 (Error: selected processor does not support `yield' in ARM mode) #71

Closed pyjhzwh closed 4 years ago

pyjhzwh commented 4 years ago

I followed the instructions on README.md to build QNNPACK

MAX_JOBS=1 scripts/build-local.sh -DBUILD_BINARY=ON -DBUILD_PYTHON=OFF \
-DUSE_OBSERVERS=OFF -DUSE_DISTRIBUTED=OFF

with the following error

FAILED: deps/pthreadpool/CMakeFiles/pthreadpool.dir/src/pthreads.c.o
/usr/bin/gcc -DFXDIV_USE_INLINE_ASSEMBLY=0 -DPTHREADPOOL_ENABLE_FASTPATH=0 -D_GNU_SOURCE=1 -I../../deps/pthreadpool/src -I../../deps/pthreadpool/include -I../../deps/fxdiv/include -O3 -DNDEBUG -fPIC   -pthread -std=c11 -MD -MT deps/pthreadpool/CMakeFiles/pthreadpool.dir/src/pthreads.c.o -MF deps/pthreadpool/CMakeFiles/pthreadpool.dir/src/pthreads.c.o.d -o deps/pthreadpool/CMakeFiles/pthreadpool.dir/src/pthreads.c.o   -c ../../deps/pthreadpool/src/pthreads.c
In file included from ../../deps/pthreadpool/src/pthreads.c:50:
../../deps/pthreadpool/include/pthreadpool.h:727:2: warning: ‘pthreadpool_function_1d_t’ is deprecated [-Wdeprecated-declarations]
  pthreadpool_function_1d_t function,
  ^~~~~~~~~~~~~~~~~~~~~~~~~
../../deps/pthreadpool/include/pthreadpool.h:733:2: warning: ‘pthreadpool_function_1d_tiled_t’ is deprecated [-Wdeprecated-declarations]
  pthreadpool_function_1d_tiled_t function,
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../deps/pthreadpool/include/pthreadpool.h:740:2: warning: ‘pthreadpool_function_2d_t’ is deprecated [-Wdeprecated-declarations]
  pthreadpool_function_2d_t function,
  ^~~~~~~~~~~~~~~~~~~~~~~~~
../../deps/pthreadpool/include/pthreadpool.h:747:2: warning: ‘pthreadpool_function_2d_tiled_t’ is deprecated [-Wdeprecated-declarations]
  pthreadpool_function_2d_tiled_t function,
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../deps/pthreadpool/include/pthreadpool.h:756:2: warning: ‘pthreadpool_function_3d_tiled_t’ is deprecated [-Wdeprecated-declarations]
  pthreadpool_function_3d_tiled_t function,
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../deps/pthreadpool/include/pthreadpool.h:767:2: warning: ‘pthreadpool_function_4d_tiled_t’ is deprecated [-Wdeprecated-declarations]
  pthreadpool_function_4d_tiled_t function,
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/ccL8UfEl.s: Assembler messages:
/tmp/ccL8UfEl.s:56: Error: selected processor does not support `yield' in ARM mode
/tmp/ccL8UfEl.s:234: Error: selected processor does not support `yield' in ARM mode
/tmp/ccL8UfEl.s:400: Error: selected processor does not support `yield' in ARM mode
ninja: build stopped: subcommand failed.

HOST machine details:

Raspberry Pi 4 gcc version 8.3.0 (Raspbian 8.3.0-6+rpi1) Target: arm-linux-gnueabihf

Any hints on how to solve this? Thanks a lot

pyjhzwh commented 4 years ago
export CXXFLAG="-march=native -mcpu=native"

can solve this