skip to Main Content

I’m trying to install OpenCL in a CentOS 7.9 system following instructions here, but yum is unable to find the opencl-headers package as shown in my command-line output below. I tried enabling all repos as instructed here, but no luck. Can anyone help? It seems I need to point yum to the correct registry where it can find the OpenCL files. If that’s correct, how do I do that? Thanks.

$ yum install opencl-headers

Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: mirror.metrocast.net
 * centos-kernel: mirror.math.princeton.edu
 * centos-kernel-experimental: mirror.pit.teraswitch.com
 * centosplus: centos.mirror.constant.com
 * extras: distro.ibiblio.org
 * fasttrack: mirrors.wcupa.edu
 * updates: centos.mirror.constant.com
No package opencl-headers available.

2

Answers


  1. You only need to install the GPU drivers. Then your device should be detected by clinfo.

    To develop code with OpenCL, you need the OpenCL header files. Find these here.

    Login or Signup to reply.
  2. opencl-headers package for CentOS 7 is a part of Extra Packages for Enterprise Linux (EPEL) repository. And this repository is not added by default, you need to add it manually. For example, using following command:

    yum install epel-release
    

    after that you will be able to install OpenCL headers using yum command

    yum install opencl-headers
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search