ComputeLibrary icon indicating copy to clipboard operation
ComputeLibrary copied to clipboard

Error when build ComputeLibrary-master library on Odroid XU4 (Mali GPU T628, armv7a processor)

Open openvisionhub opened this issue 9 years ago • 10 comments

When I use command: scons Werror=1 -j8 debug=1 neon=0 opencl=1 os=linux arch=armv7a to build "OpenCL ComputeLibrary" on Odroid XU4. it happen some error like attached image. Anyone know what is problem?

opencl errors

openvisionhub avatar Apr 12 '17 07:04 openvisionhub

Could you please copy paste the whole text of the output instead of an image ? (It looks like the error comes from earlier than what you copied) Seems like it doesn't find the CL library, are you sure it's built ?

AnthonyBarbier avatar Apr 12 '17 09:04 AnthonyBarbier

Documment instruction:

To cross-compile the library in debug mode, with NEON only support, for Linux 32bit:

  1. scons Werror=1 -j8 debug=1 neon=1 opencl=0 os=linux arch=armv7a To cross-compile the library in asserts mode, with OpenCL only support, for Linux 64bit:
  2. scons Werror=1 -j8 debug=0 asserts=1 neon=0 opencl=1 embed_kernels=1 os=linux arch=arm64-v8a I see in above document instruction. To enable OpenCL we use command number 2, However, it only supports for Linux 64 bit. But my Odroid XU4 architecture is (armv7a 32 bit, GPU Mali T628), whether can I install this library on it? I tried to change "arm = arm64-v8a" to "armv71a" to build for OpenCL using this command: scons Werror=1 -j8 debug=0 asserts=1 neon=0 opencl=1 embed_kernels=1 os=linux arch=armv71a But it cannot work

openvisionhub avatar Apr 14 '17 03:04 openvisionhub

< arch=armv71a

typo

Anyway, if your CL library is not being found, try passing LD_LIBRARY_PATH=your_path_to_opencl to scons.

MineFuehrer avatar Apr 14 '17 13:04 MineFuehrer

How to do that. I tried command: scons Werror=1 -j8 debug=0 asserts=1 neon=0 opencl=1 embed_kernels=1 os=linux arch=armv71a LD_LIBRARY_PATH = /usr/lib/ But it still not work

openvisionhub avatar Apr 16 '17 06:04 openvisionhub

OK, I meant LIBRARY_PATH scons ... in the previous comment, but the The OpenCL stub library section in https://arm-software.github.io/ComputeLibrary/v17.04/index.xhtml#S3_how_to_build explains it's not necessary.

XU4 means 32-bit Linux so the following command should work (it does for me):

scons Werror=1 -j8 debug=1 neon=1 opencl=1 os=linux arch=armv7a

However, running the xamples in the build directory requires, e.g: LD_LIBRARY_PATH=. ./neon_convolution ...

MineFuehrer avatar Apr 16 '17 11:04 MineFuehrer

Yes, @MineFuehrer is right: the command line scons Werror=1 -j8 debug=1 neon=1 opencl=1 os=linux arch=armv7a should work and you should be able to build the library by linking against the stub libOpenCL library provided in the repo. (You only need the real implementation to run your application).

AnthonyBarbier avatar Apr 18 '17 08:04 AnthonyBarbier

I forgot to mention that by default scons will look for the OpenCL library in both the root directory of the project and the build directory

AnthonyBarbier avatar Apr 18 '17 08:04 AnthonyBarbier

I assume this issue has been resolved. Please re-open if that is not the case.

mpflanzer avatar May 02 '17 08:05 mpflanzer

Can I assume Odroid XU4 GPU is supported by ACL?

metropt avatar Aug 07 '17 16:08 metropt

We haven't tried on this particular platform but we've tested on some other Exynos 5422 based platforms and it worked fine.

AnthonyBarbier avatar Aug 07 '17 16:08 AnthonyBarbier