Hybrid graphics, Prime and OpenCL

Hi,

I’m using GPUs via OpenCL for accelerating computations that are not associated with graphics, i.e. no visual output is generated (headless system).

I recently acquired a Thinkpad T460pthat has both Geforce 940MX and Intel 530 HD Graphics GPUs and I’d like to use both of them simultaneously in Ubuntu 16.04 to accelerate my OpenCL computations.

I’ve successfully installed OpenCL drivers for both Intel and nVidia (v. 367) platforms, but I haven’t been able to make both the HD Graphics and Geforce GPUs appear simultaneously as OpenCL devices. The problem does not seem to be OpenCL-related, as I can get the Geforce and the Intel i7 (not the Intel GPU) appear as coexisting OpenCL platforms.

After reading loads of forum posts etc. I’ve come to the conclusion that the problem is probably related to the Optimus technology and to that extent I’ve tinkered with ‘prime-select’ and ‘bumblebee’, but without success: it’s always either the nVidia or the Intel GPU that appears in the OpenCL device list, never both of them at the same time.

So, my question is: is there hope to get both of the GPUs for simultaneous “headless” computing, or should I quit trying? If my objective is not impossible, what steps should I take to discover the origin of the problem?

I’ve read the recent posts about Prime synchronization and Prime offloading, but I’m not sure if those are only related to setups where the GPU output needs to be rendered to the display …

I think the Intel OpenCL still doesn’t support using GPUs under Linux. Look for beignet.

The Intel OpenCL drivers (v. 2.0 and 3.0) do support the HD Graphics 530 GPU under Linux, and they work fine for me until I install the nVidia drivers as described above.

Then maybe the icd loader is changed on nvidia-driver install.

Thanks for suggesting this. However, I’ve tried multiple ICD loaders: Intel, nVidia and Khronos. No help from these.