I am investigating using AMD 7970 for a OpenCL compute engine, while maintaining my current nVIDIA graphics card for GPU rendering. I am using Linux, not Windows (ubuntu 12.10 64 bit to be specific, and Linux 3.5). I understand that neither of the open source drivers support OpenCL quite yet. I want the proprietary NVIDIA driver for GPU performance.
For clarity, I don't have any interest in OpenGL/OpenCL interoperability between the cards in this configuration. I don't plan on using the 7970 as a GPU at all, it would be solely a compute engine.
It seems to be possible to use AMD for GPU, and nVIDIA for GPGPU by installing flgrx first, and then telling the nVIDIA installer not to overwrite the OpenGL stack. But I want to do the reverse.
I have seen comments in this forum from May 2012 that AMD is working on decoupling the OpenCL from X on Linux. This would be a great thing, because AMD seems to have the lead in compute engine price/performance right now. But its really hard to figure out how to run a mixed vendor Linux system. Not having to worry about X for AMD OpenCL would be a big win.
Any help would be appreciated.
With all of the recent improvements going into Mesa/Gallium3D, along with some work advancements to the AMD GPU LLVM back-end, it's slowly becoming a suitable time for enthusiasts wishing to experiment with OpenCL on the open-source Linux graphics stack through Gallium3D and the "Clover" state tracker.
OpenCL support in Gallium3D is still far from complete and not yet comparable to the proprietary OpenCL/GPGPU offerings bundled within the proprietary AMD and NVIDIA Linux graphics drivers. In reality, it will probably be at least another year before open-source OpenCL is in good shape for the Linux desktop. At this point, there's just some simple OpenCL demos working for select graphics processors on Nouveau and Radeon.
The overview of the status and setup/installation instructions can be found on the Gallium Compute Wiki page. (Though it may take a few times to get the FreeDesktop.org Wiki to load due to errors, the FDo/Xorg server infrastructure continues to suffer badly from problems; 503 Service Unavailable, among other issues.)
For the Nouveau and Radeon drivers, most of the OpenCL/GPGPU-related items for Gallium3D remain marked as "TODO" with the only "MOSTLY" completed items being the Gallium3D hardware interface for general purpose GPU computing. There's also ambitions for CPU-based OpenCL support using the LLVMpipe driver, but there the support is very primitive.
The hardware with the best open-source OpenCL support right now is the "R800" / Evergreen series. The Radeon HD 5000 "Evergreen" GPUs is "DONE" when it comes to the non-Gallium3D test code, executes LLVM-IR compute shaders, and supports the global address space. Mostly working for the AMD HD 5000 series GPUs with this Gallium3D OpenCL code is having figured out the appropriate hardware interface, executing binary compute shaders, handling GPU buffers, and accurate arithmetics.
For the AMD Evergreen generation, it's a work-in-progress still in supporting the constant and private address spaces and then OpenCL 1.0/1.1 compliance. Items not even touched yet are performance profiling, the local address space, local/global sync, local/global atomics, 2D/3D image reading/writing, and OpenGL interoperability. In monitoring this situation for years, I'd be very rather surprised if there is satisfactory OpenCL Gallium3D support for end-users this calendar year.
The AMD Radeon HD 6000 "Northern Islands" graphics cards are also in similar standing to the Radeon HD 5000 graphics hardware.
Playing with the experimental OpenCL support over Radeon Gallium3D currently involves building LLVM with the experimental AMD R600 GPU back-end from Tom Stellard's Git repository (until LLVM 3.3 is released later this year with the AMD GPU back-end merged), building Clang 3.2 from the upstream source, building libclc - the OpenCL C Library, and building Mesa from Git with the --enable-opencl switch to tap this experimental feature. The Wiki states there are some (simple) OpenCL examples working with Clover and R600g while also there are some OpenCL regression tests beginning to appear in Piglit.
Thanks, I appreciate your thorough update on the status of the open source efforts. It is tough to wrangle all the bits to get a clear picture. I have been tracking Gallium for a while. There is a lot of red on the Gallium compute wiki page.
Unfortunately, my question is more directed to using the proprietary drivers from both NVIDIA and AMD. If it was possible to use open source OpenCL on AMD with proprietary Graphics on NVIDIA I would give that a spin, but to the best of my knowledge this is not possible currently.
I am looking for some way to install the AMD drivers needed for OpenCL only, without dragging in all of X/OpenGL, or at least having the NVIDIA proprietary drivers be dominant for graphics post install.
Given AMD's performance advantage in GPGPU, its price/performance competitiveness with Tesla, and the dominance of Linux in HPC, it would seem to me to be in AMD's interest to have a GPGPU only driver option available for Linux that doesn't drag in all of OpenGL and X.
Right now, I can't see how to deploy this scenario (AMD Compute only, NVIDIA Graphics).
Can you share what issues you faced, when you tried it have the said setup.
I was holding off the purchase of any AMD cards until I could figure out if this configuration would even work. So I have not tried it as yet.
But the reading I have done suggests lockup/crash is the result of installing AMD fglrx then installing NVIDIA proprietary driver over it. As I noted further in the thread, the supposition is that there is a linkage in between the OpenGL stack, X driver and kernel driver that is required for OpenCL to work.
I will try to create a similar system, and will post my results thereafter.
As I noted in another posting, I have gone to a pure AMD solution for a proof of concept: A10-5800K and HD 7870. But also as noted, I can't get that to work without a monitor attached. If you have time to help me, I would prefer help on identifying if I have to use a VGA dummy plug or not.
>> It seems to be possible to use AMD for GPU, and nVIDIA for GPGPU by installing flgrx first, and then telling the nVIDIA installer not to overwrite the OpenGL stack. But I want to do the reverse.
Can't you achieve the reverse by allowing NVIDIA installer to overwrite OpenGL stack?
Pardon my ignorance here. I am new to this subject.
Can't you achieve the reverse by allowing NVIDIA installer to overwrite OpenGL stack?
Opinions found via intensive Googlemancy vary. Thus why I am asking if anyone has successfully done it.
The short answer seems to be "no". The why appears to be due to the linkage of the OpenCL functionality to fglrx and its tight linkage to OpenGL stack and the X server.
Reports I have seen attempting this leave a crashed/locked up system.
There are oblique references to running a second X server for the OpenCL card. But I haven't figured out how to easily get the two installs into separate directory locations.
I am pretty close to concluding there is no easy way to achieve this right now with the current state of the AMD Linux driver short of somehow pulling the installer apart and installing it all by hand and hand-crafting the openCL.so for the card you want as the compute engine. Even that might not work if the drivers cannot be co-resident in the kernel.
Here are my observations on this topic so far:
1. System Setup AMD HD 6770 + NVIDIA geforce 630M + AMD FX CPU
2. Installed NVIDIA Graphics Driver (310.32), with NVIDIA card on primary PCI slot. 1 Monitor is connected to each GPU. Display comes on NVIDIA monitor. Backed up xorg.conf. Rebooted.
3. Now installed catalyst 12.10. Did aticonfig –adapter=all –initial and export DISPLAY=:0. Rebooted. Now Display goes to AMD GPU’s monitor. Installed SDK 2.8. Ran samples on AMD GPU. Clinfo only shows AMD as platform.
4. Now replaced the xorg.conf file with the one that was installed with NVIDIA driver. Rebooted. Display goes to NVIDIA GPU’s monitor. Now AMD platform(only CPU) is shown along with NVIDIA platform. Samples can be run on AMD CPU, but not on AMD GPU.
5. Removed all monitors and did steps to enable remote access. Accessed remotely. When AMD’s xorg.conf file is used (or if aticonfig –adapter=all –initial was done), AMD GPU is shown (no nvidia gpu), and if NVIDIA’s xorg.conf is used, NVIDIA GPU + AMD CPU show up (but no AMD GPU).
As I understand, user’s are not blocked to use AMD’s card as it can be accessed remotely. No separate NVIDIA card is required for display. But I was not able to make both the cards visible together. Most likely the issue is the conflicts that arise because both AMD and NVIDIA drivers interact with Xserver.
It would be nice if someone can share their experiences if they were able to make it work.