This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Cross-Compile ArmNN on x86_64 for arm64

Hi ,

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.

Regards

Fatima

Parents
  • Hi,

    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 cmake

    1.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/caffe

    2.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_options

    4.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
        make

    5.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 runtest

    6.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

Reply
  • Hi,

    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 cmake

    1.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/caffe

    2.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_options

    4.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
        make

    5.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 runtest

    6.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

Children
No data