Opencv with Opencl on Odroid-XU with Android OS

This topic contains 3 replies, has 2 voices, and was last updated by  Joe Davis 2 years, 10 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #31893

    satish
    Member

    Hi,

    I want to test Open-CV with Open-CL on Odroid-xu with Android OS.

    The GPU inside the Odroid-xu board is powerVR 544.

    Does it support for Open-CV with Open-CL applications ?

    when i run Open-CV with Open-CL tests, getting the following info.

    I have done the following procedure to compile the Open-CV SDK,

    I have installed SDK, NDK, and other required softwares on host system by following the ODROID-XUOpenCL.QuickStartGuide.1.0.6.External.pdf given by imagination, next i have compiled opencv for android from the trunk, the steps i have followed are

    1)cmake:
    cd opencv/platforms
    sh ./scripts/cmake_android_arm.sh
    2)compiling:
    cd build_android_arm
    make -j8
    3)python test script:
    cd opencv
    mkdir -p logs

    python modules/ts/misc/run.py platforms/build_android_arm -w ./logs

    2
    [ INFO ] Implementation variant: ocl.
    3

    4
    Time compensation is 0
    5
    OpenCV version: 2.4.9
    6
    OpenCV VCS version: unknown
    7
    Build type: release
    8
    CPU features:
    9
    OpenCL Platforms:
    10
    PowerVR SGX 544
    11
    GPU : PowerVR SGX : OpenCL 1.1
    12
    Current OpenCL device:
    13
    Platform = PowerVR SGX 544
    14
    Type = GPU
    15
    Name = PowerVR SGX
    16
    Version = OpenCL 1.1
    17
    Compute units = 1
    18
    Max work group size = 1
    19
    Local memory size = 1 kB
    20
    Max memory allocation size = 64 MB
    21
    Double support = No
    22
    Unified memory = Yes

    [==========] Running 1868 tests from 86 test cases.
    24
    Global test environment set-up.
    25
    1 test from OCL_HOGFixture_HOG
    26
    [ RUN ] OCL_HOGFixture_HOG.HOG
    27
    OpenCV Error: Assertion failed (localThreads[0] < = ctx->getDeviceInfo().maxWorkItemSizes[0]) in void cv::ocl::openCLVerifyKernel(const cv::ocl::Context*, cl_kernel, size_t*), file /home/testuser/satish/OpenCV/opencv-2.4.9/opencv-2.4.9/modules/ocl/src/cl_operations.cpp, line 351
    28
    kernelWorkGroupSize : 1,ctx->getDeviceInfo().maxWorkGroupSize : 1/home/testuser/satish/OpenCV/opencv-2.4.9/opencv-2.4.9/modules/ts/src/ts_perf.cpp:1367: Failure
    29
    Failed
    30
    Expected: PerfTestBody() doesn’t throw an exception.
    31
    Actual: it throws cv::Exception:
    32
    /home/testuser/satish/OpenCV/opencv-2.4.9/opencv-2.4.9/modules/ocl/src/cl_operations.cpp:351: error: (-215) localThreads[0] < = ctx->getDeviceInfo().maxWorkItemSizes[0] in function void cv::ocl::openCLVerifyKernel(const cv::ocl::Context*, cl_kernel, size_t*)
    33
    localThreads[0] < = ctx->getDeviceInfo().maxWorkItemSizes[0] in function void cv::ocl::openCLVerifyKernel(const cv::ocl::Context*, cl_kernel, size_t*)
    34

    Why i am getting COMPUTE_UNITS = 1 and Max work group size = 1 which causes for an assertion (in the above) ?

    I am getting localThreads[0] as 256 which is greater than ctx->getDeviceInfo().maxWorkItemSizes[0] = 1, So getting exception.

    Open-CV people saying that ,

    Your device supports OpenCL 1.1 EP (Embedded Profile). And EP can bring some restrictions with to compare to full OpenCL profile and as a result these problems with assertions can be.OpenCV-CL developers have not tested OpenCL on such devices, so we don’t officially support EP. It would be great to see some statistics of your device which can be retrieved using clinfo command line utility.

    Please provide any tool which displays the device info( like AMD clinfo utility which prints the total opencl device info)

    Please suggest me to resolve the issue.

    Thanks,
    Satish

    #39179

    Joe Davis
    Member

    Does it support for Open-CV with Open-CL applications ?

    We haven’t tried using OpenCV on this platform.

    Why i am getting COMPUTE_UNITS = 1 and Max work group size = 1 which causes for an assertion (in the above) ?

    The Series5XT hardware was primarily designed for graphics processing. Compute was exposed later, but the features are somewhat restricted as the hardware was not designed with compute in mind. One of the restrictions is the maximum workgroup size of 1.
    Series6 and newer families of PowerVR have been designed for graphics and compute. They support larger workgroup sizes.
    If OpenCV requires a workgroup larger than 1, you may not be able to get it working on the ODROID-XU.

    Please provide any tool which displays the device info( like AMD clinfo utility which prints the total opencl device info)

    We do not have a tool like this. I’ve found a project on GitHub that may be of interest though: https://github.com/Oblomov/clinfo

    Joe

    #39180

    satish
    Member

    Hi Joe,

    Thank you for prompt reply.

    You are saying that Max work group size=1 is fixed with series5XT series GPUs. Means

    1 ). OpenCL Demos which you have released with SDK are tested with COMPUTE_UNITS = 1 and Max work group size = 1 , right ?

    2).Why we are getting COMPUTE_UNITS = 1, Does GPU has only one core ?

    3).Is there any Odroid boards which supports Opencv with Opencl Full profile apps with Power VR series6 series GPU ?

    Thanks & Regards,
    Satish

    #39181

    Joe Davis
    Member

    1 ). OpenCL Demos which you have released with SDK are tested with COMPUTE_UNITS = 1 and Max work group size = 1 , right ?

    Yes. The demos in the Series5XT OpenCL SDK are designed for the hardware’s capabilities.

    2).Why we are getting COMPUTE_UNITS = 1, Does GPU has only one core ?

    From OpenCL’s point of view, Series5XT GPUs only have one logical core. This is the case for all Series5XT configurations, e.g. SGX544MP1 vs. SGX544MP3.

    3).Is there any Odroid boards which supports Opencv with Opencl Full profile apps with Power VR series6 series GPU ?

    Currently, there are no ODROID devices with Series6 GPUs. The only Series6 platform I’m aware of exposing OpenCL is the Dell Venue 8.

    Regards,
    Joe

Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.