OpenCL Driver Installation#

XCOMPUTE-SERVER requires OpenCL 1.2+ to execute numerical workloads. An Installable Client Driver (ICD) must be installed to map your hardware to the OpenCL runtime.

Verify OpenCL Status#

Use clinfo to inspect available devices: sudo apt install clinfo ocl-icd-libopencl1

Then run: clinfo

Expected Output:

Number of platforms                               1
  Platform Name                                   NVIDIA CUDA
  Platform Vendor                                 NVIDIA Corporation
  Platform Version                                OpenCL 3.0 CUDA 11.4.158
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_global_int32_base_atomics ...

If your hardware does not appear, install the appropriate vendor driver below.

Hardware Selection

  • Dedicated GPU: Recommended for high-performance compute.

  • Multi-core CPU: Viable for lighter workloads or when GPU is unavailable.

  • FPGA/Other: Supported via vendor-specific ICDs (e.g., Xilinx). Not covered here.

Vendor-Specific Installation#

AMD GPU ICD#

  1. Download the latest AMDGPU-PRO package:
    https://www.amd.com/en/support/download/linux-drivers.html

  2. Install from the terminal: ./amdgpu-pro-install -y --opencl=rocm

    Add --headless for compute-only servers to skip graphics drivers.

  3. Grant GPU access to the xcompute user: sudo usermod -a -G video xcompute sudo usermod -a -G render xcompute

NVIDIA GPU ICD#

  1. Add the graphics drivers PPA: sudo add-apt-repository ppa:graphics-drivers/ppa sudo apt update && sudo apt upgrade

  2. Install the driver and OpenCL ICD (replace NNN with your version): sudo apt install nvidia-driver-NNN nvidia-opencl-icd-NNN

    Version Guidance:

    • Volta/Ampere (V100, A100, etc.): 580

    • Legacy cards on older Ubuntu/Debian: 470

      Example for 580

      sudo apt install nvidia-driver-580 nvidia-opencl-icd-580

  3. Reboot and verify with clinfo.

Remove Old Drivers (if needed): sudo apt remove nvidia* sudo apt purge nvidia*

Intel CPU ICD#

Intel provides OpenCL drivers for modern CPUs. Refer to the official documentation:
https://software.intel.com/en-us/articles/opencl-drivers

Note: Mesa compatibility drivers are not recommended for production compute workloads.

Troubleshooting#

  • Run clinfo -l to list available devices.

  • Ensure the xcompute user belongs to video and render groups (Linux).

  • Verify OpenCL runtime matches your hardware architecture.

  • Check /var/log/syslog or dmesg for driver initialization errors.