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

Compute library run OpenCL examples

Hi

I've recently got over the Compute Library OPenCL.so problem and have moved on to trying to run the examples. I compiled natively on an Odroid XU4 with neon=1 and opencl=1 using "scons Werror=1 -j8 debug=0 neon=1 opencl=1 os=linux arch=armv7a build=native" 

I could run the neon example ok:-

    odroid@odroid:~/ComputeLibrary-17.12/build/examples$ LD_LIBRARY_PATH=~/ComputeLibrary-17.12/build ./neon_convolution

    ./neon_convolution

    Usage: ./build/neon_convolution [input_image.ppm]

    No input_image provided, creating a dummy 640x480 image

    Test passed

When trying the opencl version :-

odroid@odroid:~/ComputeLibrary-17.12/build/examples$ LD_LIBRARY_PATH=~/ComputeLibrary-17.12/build ./cl_convolution

    ./cl_convolution

    Usage: ./build/cl_convolution [input_image.ppm]

    No input_image provided, creating a dummy 640x480 image
    !!!!!!!!!!!!!!!!!!!!!!!!!!!

    ERROR in load_program src/core/CL/CLKernelLibrary.cpp:765: Kernel file ./cl_kernels/convolution3x3.cl does not exist. No such file or directory
    !!!!!!!!!!!!!!!!!!!!!!!!!!!

    Test FAILED

This looks like an OpenCL run/compile failure!
I copied the cl_kernels directory from ~/ComputeLibrary-17.12/src/core/CL into ~/ComputeLibrary-17.12/build/examples and ran it again:-

odroid@odroid:~/ComputeLibrary-17.12/build/examples$ LD_LIBRARY_PATH=~/ComputeLibrary-17.12/build ./cl_convolution

    ./cl_convolution

    Usage: ./build/cl_convolution [input_image.ppm]

    No input_image provided, creating a dummy 640x480 image

    Test passed

Is there some $PATH or other ENV value that needs set up, so that the scons compiled build code points to the original source directory rather than in the build directory or is there something I've missed in the Scons command?

Dave

Parents
  • Hi,

    This seems related to the embed_kernels=1 build option. 

    embed_kernels: For OpenCL / GLES_COMPUTE only: set embed_kernels=1 if you want the OpenCL / GLES_COMPUTE kernels to be built in the library's binaries instead of being read from separate ".cl" / ".cs" files. If embed_kernels is set to 0 then the application can set the path to the folder containing the OpenCL / GLES_COMPUTE kernel files by calling CLKernelLibrary::init() / GCKernelLibrary::init(). By default the path is set to "./cl_kernels" / "./cs_shaders".

    Maybe try to build again with embed_kernels=1 

    Thanks,

    Jason

Reply
  • Hi,

    This seems related to the embed_kernels=1 build option. 

    embed_kernels: For OpenCL / GLES_COMPUTE only: set embed_kernels=1 if you want the OpenCL / GLES_COMPUTE kernels to be built in the library's binaries instead of being read from separate ".cl" / ".cs" files. If embed_kernels is set to 0 then the application can set the path to the folder containing the OpenCL / GLES_COMPUTE kernel files by calling CLKernelLibrary::init() / GCKernelLibrary::init(). By default the path is set to "./cl_kernels" / "./cs_shaders".

    Maybe try to build again with embed_kernels=1 

    Thanks,

    Jason

Children