Use OpenCL on the AMD APU, but use the discrete graphics processor for the X server

Can I enable OpenCL on the A10-7800 without using it for an X server? I have a Linux box that I use to program GPGPU. The GEForce 740 discrete card is used both for the X server and for launching the OpenCL and Cuda programs that I am developing. I would also like the ability to run OpenCL code on the embedded GPU cores.

All that I have read so far implies that if I want to use the APU for OpenCL, I need to install Catalyst and AFAIK, which means using it for the X server. It's true? Would it be advantageous to use APU for my X server and use GEForce exclusively for GPGPU code?

+5
source share
2 answers

I had a similar goal, so I created a system with AMD APU (4 regular cores + 6 GPUs) and a discrete Nvidia graphics card. Sorry, it wasn’t easy to work, so I asked a question on the Ask Ubuntu forum, received no answers, experimented with installing hardware and software, and finally published my own answer to my question.

I will talk about my setup again - who knows what might happen to my answering machine to Ask Ubuntu ?

At first I had to turn on the integrated graphics hardware through the BIOS flag. This flag is called IGFX Multi-Monitor on my motherboard (ASUS A88X-PRO).

The second step was to find the right combination of a low-level graphics driver and a high-level OpenCL implementation. The low-level driver for AMD processors is called AMD Catalyst and has the file name fglrx . I did not install this driver from the Ubuntu software center - instead, I used version 15.302 directly downloaded from the AMD website. I had to install a significant number of prerequisites for this driver. Most importantly, I had to skip the aticonfig command after installing fglrx - this command actually configures the X server to use this driver for graphics output, and I didn’t want that.

Then I installed the AMD SDK Ver 3.0 (version 130.136, earlier versions did not work with my fglrx ) - this is AMD's OpenCL implementation. The clinfo team reports both the CPU and GPUs with the correct number of cores now.

So, I have an AMD hybrid processor supported by OpenCL, with all graphics output, supported by a discrete graphics card with an Nvidia processor.

Good luck

+2
source

I support a Linux server (OpenSUSE, but the distribution should not matter) containing both NVIDIA and AMD's (discrete) GPU. It is headless, so technically I don’t know if the X server will create additional problems, but I don’t think so. You can always configure xorg.conf to use the exact driver you want. Or in this case: install Catalyst, but delete the X server driver file itself, which is not the same as what you need for OpenCL.

There is one problem with the mixed vendor system that I noticed, however: the AMD OpenCL driver (ICD) will run for the libGL.so library, I think, in order to make OpenCL / OpenGL-interop. If he finds any of the libGL.so products supplied by NVIDIA, he will get confused and hang himself - at least on my machine. I "solved" this by removing all libGL.so (I don’t need this on a headless compute server), but this may not be an acceptable solution for you. Perhaps you can arrange things such that the AMD-supplied libGL.so takes precedence, perhaps by installing the latest AMD driver.

0
source

Source: https://habr.com/ru/post/1247169/


All Articles