I am looking for someway of using the armNN SDK on a Xilinx Zynq Platform which has Quad-core ARM® CortexTM-A53 MPCoreTM up to 1.5GHz and an ARM MALI 400 MP2 GPU. With ARM Mali GPU noted off in a previous question my next task is to look into if it is possible to run the SDK on the Cortex processor but lloking at the guides I would only be able to cross compile it. So my first question is that is it possible to run it on the ARM A53 on the Zynq Platform and also if tensorflow would run on it as well.
The error, "File in wrong format" typically means you are mixing compiled object from different architectures.
Are you cross-compiling from x86 for Arm or are you native compiling on an Arm system?
The script I have to compile Arm NN doesn't have the caffe support right now, but I can add it. For now it will show you many of the steps to build Arm NN so I recommend you look at it. The script can do both a cross compile and a native compile on Arm so you will see the differences.
Once I know your setup I can provide additional help with the compilation process.
I am cross-compiling x86 for arm-v8a
while doing cmake command it shows that it cannot find caffe.pb.cc file but while going through the path for caffe which i provided in cmake command it is visible in the file-system
about the setup ; the command i followed
0.Prerequisites sudo apt-get install git sudo apt-get install scons sudo apt-get install gcc-arm-linux-gnueabihf sudo apt-get install g++-arm-linux-gnueabihf sudo apt-get install curl sudo apt-get install autoconf sudo apt-get install libtool sudo apt-get install cmake1.Downloaded the repositry and bundles git clone github.com/.../ComputeLibrary.git git clone github.com/.../armnn wget dl.bintray.com/.../boost_1_64_0.tar.bz2 tar xf boost_1_64_0.tar.bz2 git clone -b v3.5.0 github.com/.../protobuf.git git clone https://github.com/BVLC/caffe2.Building the ComputeLibrary cd ComputeLibrary scons arch=arm64-v8a extra_cxx_flags="-fPIC" benchmark_tests=1 validation_tests=1 opencl=1 embed_kernels=1 neon=1 3.Building the boost Library cd boost_1_64_0 sh bootstrap.sh ./b2 link=static cxxflags=-fPIC --with-filesystem --with-test --with-log --with-program_options4.Building the Protobuf Library cd protobuf git submodule update --init --recursive ./autogen.sh ./configure --prefix=$/home/bhushan/Downloads/protobuf/protobuf-host ./configure --prefix=$/home/bhushan/Downloads/protobuf/protobuf-arm --host=arm-linux CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ --with-protoc=$/home/bhushan/Downloads/protobuf-host/bin/protoc make5.Building caffe for armnn cd caffe sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev libgoogle-glog-dev libgflags-dev sudo apt-get install protobuf-compiler sudo apt-get install --no-install-recommends libboost-all-dev cp Makefile.config.example Makefile.config sudo apt-get install python-pip sudo pip install scikit-image protobuf made changes in *Makefile.config* make all make test make runtest6.Building Armnn cd armnn/build/ cmake .. -DARMCOMPUTE_ROOT=/home/bhushan/ComputeLibrary -DARMCOMPUTE_BUILD_DIR=/home/bhushan/ComputeLibrary/build -DBOOST_ROOT=/home/bhushan/boost_1_64_0/boost -DCAFFE_GENERATED_SOURCES=/home/bhushan/caffe/src/caffe/proto -DBUILD_CAFFE_PARSER=1 -DARMCOMPUTENEON=1 -DARMCOMPUTECL=1 -DPROTOBUF_LIBRARY_RELEASE=/home/bhushan/Downloads/protobuf/src/.libs/libprotobuf.so -DPROTOBUF_LIBRARY_DEBUG=/home/bhushan/Downloads/protobuf/src/.libs/libprotobuf.so make
after performing the cmake for armnn build it shows that it cannot find caffe.pb.cc file
while going through the errors and warnings i saw that the boost library was not build and some files where incomplete to download .
after making changes in boost library and following the steps properly the error is resolved
Again performing the cmake command it shows error as
[ 75%] Linking CXX shared library libarmnn.so/usr/bin/ld: /home/bhushan/ComputeLibrary/build/libarm_compute_core-static.a(Error.o): Relocations in generic ELF (EM: 183)/usr/bin/ld: /home/bhushan/ComputeLibrary/build/libarm_compute_core-static.a(Error.o): Relocations in generic ELF (EM: 183)/usr/bin/ld: /home/bhushan/ComputeLibrary/build/libarm_compute_core-static.a(Error.o): Relocations in generic ELF (EM: 183)/usr/bin/ld: /home/bhushan/ComputeLibrary/build/libarm_compute_core-static.a(Error.o): Relocations in generic ELF (EM: 183)/usr/bin/ld: /home/bhushan/ComputeLibrary/build/libarm_compute_core-static.a(Error.o): Relocations in generic ELF (EM: 183)/home/bhushan/ComputeLibrary/build/libarm_compute_core-static.a: error adding symbols: File in wrong formatcollect2: error: ld returned 1 exit statusCMakeFiles/armnn.dir/build.make:1704: recipe for target 'libarmnn.so' failedmake: *** [libarmnn.so] Error 1CMakeFiles/Makefile2:113: recipe for target 'CMakeFiles/armnn.dir/all' failedmake: *** [CMakeFiles/armnn.dir/all] Error 2Makefile:127: recipe for target 'all' failedmake: *** [all] Error 2
after going through these errors i recompile the computeLibrary but no error while make command
after that i followed the steps for protobuf no error while make
~/Downloads/protobuf$ makemake all-recursivemake: Entering directory '/home/bhushan/Downloads/protobuf'Making all in .make: Entering directory '/home/bhushan/Downloads/protobuf'make: Leaving directory '/home/bhushan/Downloads/protobuf'Making all in srcmake: Entering directory '/home/bhushan/Downloads/protobuf/src'make: Nothing to be done for 'all'.make: Leaving directory '/home/bhushan/Downloads/protobuf/src'make: Leaving directory '/home/bhushan/Downloads/protobuf'
but got errors while make install
libtool: error: only absolute run-paths are allowedMakefile:2201: recipe for target 'libprotobuf-lite.la' failedmake: *** [libprotobuf-lite.la] Error 1make: Leaving directory '/home/bhushan/Downloads/protobuf/src'Makefile:1594: recipe for target 'all-recursive' failedmake: *** [all-recursive] Error 1make: Leaving directory '/home/bhushan/Downloads/protobuf'Makefile:1501: recipe for target 'all' failedmake: *** [all] Error 2
How can i solve these error i delete all the previous file and downloaded the new ones but same errors occur as previous one
can u plz suggest where i am going wrong
Hi, thanks for your great advice, but for now I have another problem.
I'm a Xilinx FPGA user, now I have complete the build process for armnn which mean I have generated the .so file and UnitTest can execute successfully on my ZCU104.
But the rest of my code is compiled and build on my IDE like this
The makefile is generated by IDE, which i can use GUI to config make setting
The setting I frequently use is this two
Which indicate the -i and -l command in makefile
so what file should I extract so that I can build armnn software in this IDE?