PDA

View Full Version : AMD OpenCL with Nivida GPU



akhal
07-21-2011, 06:35 AM
Hello

I have installed AMD SDK for OpenCL. My system has "NVIDIA GeForce 9200M GS" GPU and I have the latest driver installed for this GPU. I want to know should this GPU work with AMD implementation of OpenCL? Because I read somewhere that Nvidia OpenCL doesnt work with AMD GPU by AMD's OpenCL implementation works with Nividia GPU too because AMD manufactures both CPUs and GPUs.
In my program, though when I try to find GPU device, it failes to return GPU...

uelkfr
07-21-2011, 08:10 AM
AMD have two conformant implementations of OpenCL for their GPUs/APUs and for their CPUs. They don't have implementation for NVidia video cards. You can use AMD implementation for CPUs, which works on any CPU with SSE3 and which I think is best among others.

Others are Intel implementation which works only Windows 7 and only Intel processors, Apple implementation which works only on MacOS X 10.7+. NVidia implementation only supports OpenCL 1.0 with little amount of KHR extensions, they monopolistically forcing you to use CUDA.

Also note that only AMD implementation have very good redistributable to install with your application on clients machines.

uelkfr
07-21-2011, 08:17 AM
Also note that AMD implementation transparently merges with Visual Studio and gDEBugger allowing you running OpenCL kernel step by step which increases OpenCL learning curve and you don't have to use OpenCL's printf.

ken-domino
07-21-2011, 02:09 PM
Hello

I have installed AMD SDK for OpenCL. My system has "NVIDIA GeForce 9200M GS" GPU and I have the latest driver installed for this GPU. I want to know should this GPU work with AMD implementation of OpenCL? Because I read somewhere that Nvidia OpenCL doesnt work with AMD GPU by AMD's OpenCL implementation works with Nividia GPU too because AMD manufactures both CPUs and GPUs.
In my program, though when I try to find GPU device, it failes to return GPU...

I have both NVIDIA and AMD cards installed in my system, and drivers for both devices installed. I can create a program that is linked to either NVIDIA's or AMD's OpenCL SDK and run code on both cards in the program. I think this is because most of the functionality for OpenCL is placed in the drivers for the devices, not in the layer that is linked in with the code. At first, some of the sample OpenCL code that I used failed to find devices too. But that was because the code passed NULL for platform ID into clGetDeviceIDs(). When it's NULL, the behavior is "implementation dependent" according to the spec. So, maybe that's one area where there is a difference in the two SDK's. Try getting the platform id's using clGetPlatformIDs() first, and see if that helps. --Ken

Maxim Milakov
07-21-2011, 09:58 PM
Also note that AMD implementation transparently merges with Visual Studio and gDEBugger allowing you running OpenCL kernel step by step which increases OpenCL learning curve and you don't have to use OpenCL's printf.

Did you manage to do it? It fails fo? me.

uelkfr
07-21-2011, 10:50 PM
Also note that AMD implementation transparently merges with Visual Studio and gDEBugger allowing you running OpenCL kernel step by step which increases OpenCL learning curve and you don't have to use OpenCL's printf.

Did you manage to do it? It fails fo? me.
What version gDEBugger you use 5.8 or 6.0? What video card and drivers do you have?

Maxim Milakov
07-22-2011, 04:02 AM
Also note that AMD implementation transparently merges with Visual Studio and gDEBugger allowing you running OpenCL kernel step by step which increases OpenCL learning curve and you don't have to use OpenCL's printf.

Did you manage to do it? It fails fo? me.
What version gDEBugger you use 5.8 or 6.0? What video card and drivers do you have?

gDEBugger 6.0 with Catalyst 11.7 preview. AMD Cayman 6950. When I start VS2010 it says that it fails to local the gDEBugger package.

http://pics.livejournal.com/maxim_milakov/pic/0000yws2

uelkfr
07-22-2011, 12:16 PM
Visual Studio Service Pack installed? Other Plug-in installed, if yes try disabling them especially profiling and debugging ones, maybe Parallel Nsight.

Maxim Milakov
07-23-2011, 12:05 AM
Visual Studio Service Pack installed? Other Plug-in installed, if yes try disabling them especially profiling and debugging ones, maybe Parallel Nsight.

Yep, SP1 is installed.

The only other plug-in installed is Parallel Nsight, BUT I experienced the problem long before I installed Parallel Nsight. But I will double-check the list of plug-ins.

uelkfr
07-23-2011, 10:16 PM
From FAQ:


7. What version of MS Visual Studio is supported?
The AMD APP SDK v2.4 with OpenCL 1.1 supports Microsoft® Visual Studio 2008
Professional Edition and Microsoft® Visual Studio 2010 Professional Edition.


Maybe you have Express Edition?

Maxim Milakov
07-23-2011, 10:29 PM
Maybe you have Express Edition?

I have VS2010 Ultimate.

uelkfr
07-24-2011, 05:33 AM
OpenCL programs should be compiled using "-g" compiler option in clBuildProgram() and you should start debugging using not regular F5, but gDEBugger menu Start OpenCL and OpenGL debugging or Shift-Alt-F5.

Maxim Milakov
07-24-2011, 05:44 AM
OpenCL programs should be compiled using "-g" compiler option in clBuildProgram() and you should start debugging using not regular F5, but gDEBugger menu Start OpenCL and OpenGL debugging or Shift-Alt-F5.

Thanks for "-g" switch, I didn't know about it. But the problem is that the package doesn't load correctly when I start VS2010 not when I try to debug my application.

akhal
07-27-2011, 10:12 AM
I have only AMD SDK and with it I can select Nvidia platform (since I have installed Nvidia driver) and then I select my gpu, make a context for it, command queue too and then I made program object. But when I build program object with clBuildProgram() it fails and the output screen exits automaticlly.. my program executes successfully when I try to choose my cpu device from platform AMD. whats problem, should I have to install nvidia implementation too? if yes, then why it also showing me Nvidia platform and its gpu device and successfully makes context and command queue for it?

ken-domino
07-27-2011, 10:50 AM
I have only AMD SDK and with it I can select Nvidia platform (since I have installed Nvidia driver) and then I select my gpu, make a context for it, command queue too and then I made program object. But when I build program object with clBuildProgram() it fails and the output screen exits automaticlly.. my program executes successfully when I try to choose my cpu device from platform AMD. whats problem, should I have to install nvidia implementation too? if yes, then why it also showing me Nvidia platform and its gpu device and successfully makes context and command queue for it?

Try clBuildProgram() with optimizations disabled (e.g., err = clBuildProgram(program, 1, &device, "-cl-opt-disable", NULL, NULL);). Otherwise, you may have to try it by installing the CUDA SDK.

akhal
08-04-2011, 04:13 PM
ok thanks... lemme try :)