OAID / Caffe-HRT

Heterogeneous Run Time version of Caffe. Added heterogeneous capabilities to the Caffe, uses heterogeneous computing infrastructure framework to speed up Deep Learning on Arm-based heterogeneous embedded platform. It also retains all the features of the original Caffe architecture which users deploy their applications seamlessly.
Other
269 stars 99 forks source link

Cannot complie CaffeOnACL missing Compute library #23

Open holopekochan opened 6 years ago

holopekochan commented 6 years ago

I have followed the instruction. also the pdf to compile CaffeOnACL. Hpwever, it keeps failing during "sudo make all" steps. I have tried to compile computer library again but the library are still not compatible or missing. Any help would be appreciated. Thanks

screenshot from 2017-11-10 04-24-42

screenshot from 2017-11-10 04-29-21

Ood-Tsen commented 6 years ago

any update ? I meet the same problem.

daeinki commented 6 years ago

Please check libarm_compute.so and libarm_compute_core.so files are located in /usr/lib directory before compiling CaffeOnACL. CaffeOnACL will try to find ACL library in /usr/lib first for linking.

Thanks.

sumsuddin commented 6 years ago

I am facing the same problem. The files are at /usr/local/AID/ComputeLibrary/lib/ and they are found too. But the problem is that those libraries are built for arm compiled by aarch64-linux-gnu-gcc, I think that's why it is showing

skipping incompatible /usr/local/AID/ComputeLibrary/lib/libarm_compute.so

joey2014 commented 6 years ago

The the libarm_compute.so in AID is 64bit, did you try to build 32bit libraries? if so, please compile Arm Compute library to 32 bit yourself.

sumsuddin commented 6 years ago

I have followed the installation process on the repo. I am not sure that the given Makefile file made it 32 bit or not. The docker files are also misleading I guess. Because they are for official bvlc/caffe not for this repository.

sejal-gupta commented 6 years ago

Is there any solution to the above problem I an facing the same problem.

joey2014 commented 6 years ago

@sejal-gupta Did you try to build 32 bits program? Can you paste the error message?

sejal-gupta commented 6 years ago

@joey2014 thank you for your reply. Following is the error I am getting. LD -o .build_release/lib/libcaffe.so.1.0.0-rc5 /usr/bin/ld: skipping incompatible /usr/local/AID/ComputeLibrary/lib/libarm_compute.so when searching for -larm_compute /usr/bin/ld: cannot find -larm_compute /usr/bin/ld: skipping incompatible /usr/local/AID/ComputeLibrary/lib/libarm_compute_core.so when searching for -larm_compute_core /usr/bin/ld: cannot find -larm_compute_core /usr/bin/ld: cannot find -lhdf5_hl /usr/bin/ld: cannot find -lhdf5 collect2: error: ld returned 1 exit status Makefile:626: recipe for target '.build_release/lib/libcaffe.so.1.0.0-rc5' failed make: *** [.build_release/lib/libcaffe.so.1.0.0-rc5] Error 1

joey2014 commented 6 years ago

@sejal-gupta
You tried to build 32 bits Caffe, but the default build enviroment only works on 64 bits.

There are two reasons that caused the link failure:

  1. The prebuilt arm compute libraries is 64 bits /usr/local/AID/ComputeLibrary/lib/libarm_compute_core.so is 64bits library, [solution] delete or rename /usr/local/AID, and git clone the arm compute libraries and build 32 bits libraries yourself: scons Werror=1 -j8 debug=1 neon=1 opencl=1 os=linux arch=armv7a refer to https://arm-software.github.io/ComputeLibrary/v18.03/index.xhtml#S3_2_1_library *You also can build arm compute libraries without opencl support, let opencl=0. In this case you need change USE_OPENCL:=0 in Caffe-HRT/Makefile.config.acl.
  2. not set correct search path for 32 bits hdf5 libraries you need change HDF5_LIBRARY_DIRS := /usr/lib/arm-linux-gnueabihf/hdf5/serial in Caffe-HRT/Makefile.config.acl. *new version we add variable ARM_ARCH to control, currently you have to change the search path yourself.
sejal-gupta commented 6 years ago

@joey2014 Thanks a lot