1

I am trying to use OpenCV with target OpenCL in a Ubuntu 16.04 system with intel UHD 620 graphics. I have installed ocl-icd-opencl-dev for OpenCL but cv::ocl::haveOpenCL() tells me that I do not have OpenCL

clinfo gives me

Number of platforms                               0

Then I tried installing beignet as this answer proposes. Still cv::ocl::haveOpenCL() tells me that I do not have OpenCL and now clinfo says

Number of platforms                               1
Platform Name                                   Intel Gen OCL Driver
Platform Vendor                                 Intel
Platform Version                                OpenCL 1.2 beignet 1.1.1
Platform Profile                                FULL_PROFILE
Platform Extensions                             cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_spir cl_khr_icd
Platform Extensions function suffix             Intel
beignet-opencl-icd: no supported GPU found, this is probably the wrong opencl-icd package for this hardware

Can anybody help?

Teshan Shanuka J
  • 1,448
  • 2
  • 17
  • 31

1 Answers1

1

ocl-icd-opencl-dev are development files for OCL-ICD loader. You'll need that if you want to develop (compile) against libOpenCL. If you don't want to develop, only use OpenCL programs, then you just need ocl-icd-libopencl1.

cv::ocl::haveOpenCL() tells me that I do not have OpenCL

ocl-icd is just a loader; you need an actual implementation. As explained on Khronos:

The OpenCL Installable Client Driver (ICD) is a mechanism to allow OpenCL implementations from multiple vendors to coexist on a system

Then I tried installing beignet

beignet is an implementation, but it's too old for your GPU. You need either their proprietary implementation, or Intel NEO.

mogu
  • 1,091
  • 6
  • 8
  • Thanks. I have no prior experience with `OpenCL` so I asked. I tried Intel NEO but some requirements for NEO can't be satisfied in Ubuntu 16.04. (Need 18.04 or higher for needed versions of some dependencies) By the way I no longer need OpenCL so I'm not gonna try further. Hope this answer helps someone else. – Teshan Shanuka J Sep 17 '19 at 05:51