Use OpenCL on AMD APU but use discrete GPU for the X server
Asked Answered
G

2

6

Is it possible to enable OpenCL on an A10-7800 without using it for the X server? I have a Linux box that I use for GPGPU programming. A discrete GEForce 740 card is used for both the X server and running OpenCL & Cuda programs I develop. I would also like the option of running OpenCL code on the APU's integrated GPU cores.

Everything I've read so far implies that if I want to use the APU for OpenCL, I have to install Catalyst and, AFAIK, that means using it for the X server. Is this true? Would there be an advantage to using the APU for my X server and using the GEForce solely for GPGPU code?

Gambeson answered 15/4, 2016 at 4:28 Comment(1)
If x server is 64 bit, you could try 32 bit driver for APU so it is not seen by x-server?Fourlegged
R
3

I had a similar goal, so I've built a system with AMD APU (4 regular cores + 6 GPUs) and Nvidia discrete graphics board. Sorry to say it wasn't easy to make it work, so I asked a question on the Ask Ubuntu forum, didn't get any answers, experimented a lot with hardware and software setup, and finally have posted my own answer to my question.

I'll describe my setup again here - who knows, what might happen with my auto-answered question on the Ask Ubuntu?

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

The second step was to find a right mix of a low-level graphics driver and high-level OpenCL implementation. The low-level driver for AMD processors is called AMD Catalyst and has a file name fglrx. I didn't install this driver from the Ubuntu software center - instead I used a version 15.302, directly downloaded from the AMD site. I had to install a significant number of prerequisites for this driver. The most important finding was that I had to skip running the aticonfig command after the fglrx installation - this command actually configures the X server to use this driver for graphics output, and I didn't want that.

Then I've installed the AMD SDK Ver 3.0 (release 130.136, earlier releases didn't work with my fglrx) - it's the OpenCL implementation from AMD. The clinfo command reports both CPUs and GPUs with correct number of cores now.

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

Good luck!

Red answered 18/4, 2016 at 14:19 Comment(2)
Thanks for the answer. Your situation closely mirrors mine and the information you provided will certainly get me further down the road when I try it out. Or else get me in deeper over my head! :)Gambeson
Finally got around to trying HEKTO's advice and got close. Very close. When I boot, I can run clinfo and it reports that there are two platforms available - the NVidia card and the APU. But subsequent attempts to run clinfo or oclDeviceQuery result in a segfault. Searching the web shows that this may be a known issue. I'm sure it isn't helped that I'm running Linux Mint, which isn't really a supported platform for what I want to do but the fact that I'm close gives me hope.Gambeson
G
0

I maintain a Linux server (OpenSUSE, but the distribution shouldn't matter) containing both NVIDIA and (a discrete) AMD GPU. It's headless, so technically I do not know whether the X server will create additional problems, but I don't think so. You can always configure xorg.conf to use exactly the driver you want. Or for that matter: install Catalyst, but delete the X server driver file itself, which is not the same thing that you need for OpenCL.

There is one problem with a mixed-vendor system that I noticed, however: AMDs OpenCL driver (ICD) will go spelunking for a libGL.so library, I guess in order to do OpenCL/OpenGL-interop. If it finds any of the NVIDIA-supplied libGL.so's, it will get confused and hang - at least on my machine. I "solved" this by deleting all libGL.so's (I do not need it on a headless compute server), but that might not be an acceptable solution for you. Maybe you can arrange things such that the AMD-supplied libGL.so's take precedence, possibly by installing the AMD driver last.

Guerrilla answered 17/4, 2016 at 19:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.