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#
Download the latest AMDGPU-PRO package:
https://www.amd.com/en/support/download/linux-drivers.htmlInstall from the terminal:
./amdgpu-pro-install -y --opencl=rocmAdd
--headlessfor compute-only servers to skip graphics drivers.Grant GPU access to the
xcomputeuser:sudo usermod -a -G video xcomputesudo usermod -a -G render xcompute
NVIDIA GPU ICD#
Add the graphics drivers PPA:
sudo add-apt-repository ppa:graphics-drivers/ppasudo apt update && sudo apt upgradeInstall the driver and OpenCL ICD (replace
NNNwith your version):sudo apt install nvidia-driver-NNN nvidia-opencl-icd-NNNVersion Guidance:
Volta/Ampere (V100, A100, etc.):
580Legacy cards on older Ubuntu/Debian:
470Example for 580
sudo apt install nvidia-driver-580 nvidia-opencl-icd-580
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 -lto list available devices.Ensure the
xcomputeuser belongs tovideoandrendergroups (Linux).Verify OpenCL runtime matches your hardware architecture.
Check
/var/log/syslogordmesgfor driver initialization errors.