armnn: Errors when building Arm NN
Hello,
I follow this link to build Arm NN with TensorFlow lite. I skip “Build the Google Protocol Buffers library” and “Generate the build dependencies for ONNX” part because I only use Tensorflow Lite. I was able to follow all the steps until “Build Arm NN” part
The only steps I add into or (differ from) the original setting: I add DFLATBUFFERS_LIBRARY option to solve “Flatbuffers library located at: FLATBUFFERS_LIBRARY-NOTFOUND” errors
cmake command I am using:
cmake .. -DARMCOMPUTE_ROOT=$BASEDIR/ComputeLibrary
-DARMCOMPUTE_BUILD_DIR=$BASEDIR/ComputeLibrary/build
-DSHARED_BOOT=ON -DBOOST_ROOT=$BASEDIR/boost -DBUILD_TF_LITE_PARSER=1
-DTF_LITE_GENERATED_PATH=$BASEDIR/flatbuffers-1.12.0/build/tflite
-DFLATBUFFERS_ROOT=$$BASEDIR/flatbuffers-1.12.0
**-DFLATBUFFERS_LIBRARY=$BASEDIR/flatbuffers-1.12.0/libflatbuffers.a**
-DFLATC_DIR=$BASEDIR/flatbuffers-1.12.0/build
-DARMCOMPUTENEON=1 -DARMNNREF=1
cmake result:
-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Flatbuffers headers are located at: /home/shunya/hungyang/armnn-dist/flatbuffers-1.12.0/include
-- Flatbuffers library located at: /home/shunya/hungyang/armnn-dist/flatbuffers-1.12.0/libflatbuffers.a
-- Tf Lite generated header found at: /home/shunya/hungyang/armnn-dist/flatbuffers-1.12.0/build/tflite
-- Looking for valgrind/memcheck.h
-- Looking for valgrind/memcheck.h - not found
-- Armnn Serializer support is disabled
-- PyArmNN wheel package is disabled
-- PyArmNN source package is disabled
-- Including backend common library into the build: /home/shunya/hungyang/armnn-dist/armnn/src/backends/aclCommon/common.cmake
-- Including backend common library into the build: /home/shunya/hungyang/armnn-dist/armnn/src/backends/backendsCommon/common.cmake
-- Including backend into the build: /home/shunya/hungyang/armnn-dist/armnn/src/backends/cl/backend.cmake
-- CL backend is disabled
-- Including backend into the build: /home/shunya/hungyang/armnn-dist/armnn/src/backends/neon/backend.cmake
-- Including backend into the build: /home/shunya/hungyang/armnn-dist/armnn/src/backends/reference/backend.cmake
-- Adding object library dependency to armnn: armnnAclCommon
-- Adding object library dependency to armnn: armnnBackendsCommon
-- Adding object library dependency to armnn: armnnClBackend
-- Adding object library dependency to armnn: armnnNeonBackend
-- Adding object library dependency to armnn: armnnNeonBackendWorkloads
-- Adding object library dependency to armnn: armnnRefBackend
-- Adding object library dependency to armnn: armnnRefBackendWorkloads
-- Adding object library dependency to UnitTests: armnnAclCommonUnitTests
-- Adding object library dependency to UnitTests: armnnBackendsCommonUnitTests
-- Adding object library dependency to UnitTests: armnnNeonBackendUnitTests
-- Adding object library dependency to UnitTests: armnnRefBackendUnitTests
-- CMAKE_CURRENT_LIST_DIR /home/shunya/hungyang/armnn-dist/armnn
-- CMAKE_CURRENT_BINARY_DIR /home/shunya/hungyang/armnn-dist/armnn/build
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
BOOST_ROOT
SHARED_BOOT
-- Build files have been written to: /home/shunya/hungyang/armnn-dist/armnn/build
But it always shows errors when the progress at 49% I have tried flatbuffers-1.10.0 version but I still get the same errors at 49% when using “make” command.
More info: the platform I am using is HiKey 970
Thanks for your help in advance 😃
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 16
Hi @HungYangChang, we support TensorFlow version 2.3.1, as mentioned in our release notes, could you try with ArmNN 21.08 and Tensorflow 2.3.1?
@payaljindal Thanks for the nice explaining. Also, I think shape_signature in tflite parser is somehow missing or not working correctly. Could @FrancisMurtagh-arm check that?
Thanks for your help in advance 😃
@payaljindal May I ask which version of ARM compute library are you using? Is it 21.08 or 21.05?
Hi @FrancisMurtagh-arm, I used a different version of Arm NN(21.05). Now, I am able to build successfully.
Thanks, Payal
Hi @HungYangChang & @payaljindal,
Could you post your schema_generated.h and confirm your Tensorflow version?
Thanks, Francis.
@payaljindal I still cannot figure that out. But I will update here if I get any progress. I think ARM developers might reply on Tuesday since Monday is Labor day.
I am also facing the same error. @HungYangChang if you found any solution, please put it here as well. Thanks in advance.
Hello @FrancisMurtagh-arm
I tried to follow your sugeestion
And here is the tflite path:
And then I use the following command
But I still get the same error:
I also find out link (in Mandarin) have a similar issue. Thanks for the help in advacne.
Hi @HungYangChang,
You appear to be using the incorrect DTF_LITE_GENERATED_PATH, it should be pointing to a file called schema_generated.h not what you have /home/shunya/hungyang/armnn-dist/flatbuffers-1.12.0/build/tflite
This is generated using:
/usr/bin/flatc -c --gen-object-api --reflect-types --reflect-names -o path/we/output/to path/to/tensorflow/schema.fbs
In the link you provided there seems to be a typo in schema.fbs:
I’ll put a request in for the document to be updated for the typo
Thanks, Francis.