OpenCL with UbiLinux

Jesse Kaukonen
Jesse Kaukonen New Member Posts: 42 ✭✭
edited July 2017 in UP Board Linux
What packages do I have to install to use the GPU on the UpBoard for OpenCL on UbiLinux? As per this topic it seems OpenCL is possible. The specs on the product page also show:
Intel® HD 400 Graphics ,12 EU GEN 8, up to 500MHz Support DX*11.1/12, Open GL*4.2, Open CL*1.2 OGL ES3.0, H.264, HEVC(decode), VP8

I've compiled a small test program to see if OpenCL is usable:
gekko@delicode-5ENNA:~/cltest$ g++ -std=c++11 -Wall -I/usr/include -L/usr/lib/x86_64-linux-gnu -lOpenCL main.cpp -o cltest
gekko@delicode-5ENNA:~/cltest$ ./cltest
Did not get any platforms
gekko@delicode-5ENNA:~/cltest$ ldd cltest
        linux-vdso.so.1 (0x00007ffd8170b000)
        libOpenCL.so.1 => /usr/lib/x86_64-linux-gnu/libOpenCL.so.1 (0x00007f5774a8e000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f5774783000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f5774481000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f577426b000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5773ec0000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f5773cbb000)

Attempting to install the Intel OpenCL SDK from their official site shows:
Missing optional prerequisites
-- GPU is not supported
-- Missing libraries
-- Mono is not installed
-- Java* Runtime Environment 64-bit version 1.8.71 or newer is not detected
--------------------------------------------------------------------------------

I doubt this is required - my understanding is that Intel driver stuff should be easily available from the standard repos?

Running glxgears -info shows:
GL_RENDERER   = Mesa DRI Intel(R) Cherryview
GL_VERSION    = 3.0 Mesa 10.3.2
GL_VENDOR     = Intel Open Source Technology Center

Comments

  • DCleri
    DCleri Administrator, AAEON Posts: 1,213 admin
    Unfortunately it is not that easy to install OpenCL with the current ubilinux 3.0, which is based on Debian Jessie.

    Luckily we are going to release in the coming weeks an updated version of our ubilinux 4.0 beta with support for UP Board, UP Squared and UP Core.

    The updated operating system is based on Debian Stretch and it is very easy to enable openCL via apt, installing beignet 1.3.0: https://packages.debian.org/stretch/beignet-opencl-icd

    Otherwise you can try to enable jessie-backports repository on ubilinux 3.0 and install the package there.
  • theodoros p
    theodoros p New Member Posts: 24
    And which package we download intel or AMD?
  • Jesse Kaukonen
    Jesse Kaukonen New Member Posts: 42 ✭✭
    I've now tested this on UpBoard with ubilinux 4, and installing the following packages is all one needs to do: beignet-opencl-icd ocl-icd-opencl-dev opencl-c-headers
  • fnoop
    fnoop New Member Posts: 28
    Beignet is only the GPU isn't it? Anyone tried the full Intel packages to get CPU as well?
  • theodoros p
    theodoros p New Member Posts: 24
    Yes beignet works only with GPU I tried to install intel Sdk but I think it didn’t support ubilinux it supports ubuntu 12 or 14 I think.To all my computers I run 12.00 or 14.00 with Intel sdk and the opencl works in CPU and GPU as well
  • fnoop
    fnoop New Member Posts: 28
    @pantheongr When you're doing OpenCL work how much difference does the CPU make? Is the GPU hugely more powerful so missing the CPU doesn't matter that much, or is the CPU a significant portion of the CL processing power?
  • theodoros p
    theodoros p New Member Posts: 24
    If you use the GPU you have to write your code using as more as possible work items to fully parallelise the code then the GPU is powerful but if you ll write your code with single work items it means each core of the GPU use only ONE. work item then the CPU in the same concept it’s much much faster,recently I made a test in vision applications and i wrote kernels using only 1 work item for CPU and 1 work item for GPU the results was for the same kernel 5 ms for GPU and 0,3ms for CPU significant difference!
  • fnoop
    fnoop New Member Posts: 28
    Interesting, thanks. Would be interested to know if anyone has managed to extract full performance from GPU and CPU in OpenCL, and what the relative contribution is from each.
Privacy Policy