Skip to content

CMake build error on armv7 with latest gcc #2003

Closed
@yukyon

Description

@yukyon

Hi, thank you for your great job!

I'm trying to build tensorflow lite 2.6.0 on armv7 environment with xnnpack.

But, cmake build error occurred with gcc 9.3 or higher.
(gcc 8.3, 9.2 is ok)

I also tried to build the same test in yocto(dunfell and hardknott)
(dunfell uses gcc 9.3.1, hardknott uses gcc 10.2)

All the same, a build error occurred in neondot.

my build option

ARMCC_FLAGS="-march=armv7-a -mfpu=neon-vfpv4 -funsafe-math-optimizations"
ARMCC_PREFIX=/home/worker/work/toolchains/gcc-arm-10.2-2020.11-x86_64-arm-none-linux-gnueabihf/bin/arm-none-linux-gnueabihf-
cmake -DCMAKE_C_COMPILER=${ARMCC_PREFIX}gcc   -DCMAKE_CXX_COMPILER=${ARMCC_PREFIX}g++   -DCMAKE_C_FLAGS="${ARMCC_FLAGS}"   -DCMAKE_CXX_FLAGS="${ARMCC_FLAGS}"   -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON   -DCMAKE_SYSTEM_NAME=Linux   -DCMAKE_SYSTEM_PROCESSOR=armv7   -DBUILD_SHARED_LIBS=ON   ../tensorflow/lite/

build error log

[ 86%] Building C object _deps/xnnpack-build/CMakeFiles/XNNPACK.dir/src/qc8-gemm/gen/1x8c4-minmax-fp32-neondot.c.o
cd /home/worker/git/tensorflow/build_armv7/_deps/xnnpack-build && /home/worker/work/toolchains/gcc-arm-10.2-2020.11-x86_64-arm-none-linux-gnueabihf/bin/arm-none-linux-gnueabihf-gcc -DCPUINFO_SUPPORTED_PLATFORM=1 -DEIGEN_MPL2_ONLY -DFXDIV_USE_INLINE_ASSEMBLY=0 -DNOMINMAX=1 -DPTHREADPOOL_NO_DEPRECATED_API=1 -DXNNPACK_EXPORTS -DXNN_ENABLE_ASSEMBLY=1 -DXNN_ENABLE_MEMOPT=1 -DXNN_ENABLE_SPARSE=1 -DXNN_LOG_LEVEL=0 -I/home/worker/git/tensorflow/build_armv7/xnnpack/include -I/home/worker/git/tensorflow/build_armv7/xnnpack/src -I/home/worker/git/tensorflow/build_armv7/clog-source/deps/clog/include -I/home/worker/git/tensorflow/build_armv7/cpuinfo-source/include -I/home/worker/git/tensorflow/build_armv7/pthreadpool-source/include -I/home/worker/git/tensorflow/build_armv7/FXdiv-source/include -I/home/worker/git/tensorflow/build_armv7/FP16-source/include -march=armv7-a -mfpu=neon-vfpv4 -funsafe-math-optimizations -O3 -DNDEBUG -fPIC -Wno-psabi -pthread -std=gnu99  -marm  -march=armv8.2-a+dotprod -mfpu=neon-fp-armv8  -O2  -MD -MT _deps/xnnpack-build/CMakeFiles/XNNPACK.dir/src/qc8-gemm/gen/1x8c4-minmax-fp32-neondot.c.o -MF CMakeFiles/XNNPACK.dir/src/qc8-gemm/gen/1x8c4-minmax-fp32-neondot.c.o.d -o CMakeFiles/XNNPACK.dir/src/qc8-gemm/gen/1x8c4-minmax-fp32-neondot.c.o -c 
/home/worker/git/tensorflow/build_armv7/xnnpack/src/qc8-gemm/gen/1x8c4-minmax-fp32-neondot.c
/tmp/cccuMfcB.s: Assembler messages:
/tmp/cccuMfcB.s:60: Error: selected processor does not support `vsdot.s8 q8,q11,d7[0]' in ARM mode
/tmp/cccuMfcB.s:62: Error: selected processor does not support `vsdot.s8 q10,q9,d7[0]' in ARM mode
/tmp/cccuMfcB.s:65: Error: selected processor does not support `vsdot.s8 q8,q9,d7[1]' in ARM mode
/tmp/cccuMfcB.s:69: Error: selected processor does not support `vsdot.s8 q10,q9,d7[1]' in ARM mode
/tmp/cccuMfcB.s:140: Error: selected processor does not support `vsdot.s8 q8,q11,d7[0]' in ARM mode
/tmp/cccuMfcB.s:142: Error: selected processor does not support `vsdot.s8 q10,q9,d7[0]' in ARM mode
_deps/xnnpack-build/CMakeFiles/XNNPACK.dir/build.make:20980: recipe for target '_deps/xnnpack-build/CMakeFiles/XNNPACK.dir/src/qc8-gemm/gen/1x8c4-minmax-fp32-neondot.c.o' failed

I would like to know if there are any plans to support the latest gcc version.
Or Please help if there is something I did wrong.

Thanks,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions