cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

enliten
Journeyman III

Using ATI OpenCL for NVIDIA platforms

I have linux-based server with NVIDIA GPUs and x86 CPUs on which I have installed both NVIDIA and ATI OpenCL implementations. I have thus two OpenCL platforms on that machine (ATI and NVIDIA). Now, what I noticed is that I can use ATI OpenCL API to even use NVIDIA Platform and vice-versa. Maybe, I am missing some point as I thought it should not be possible.

 

For example, when I am compiling with ATI, I am giving something like:

g++ -c  -I/opt/amdstream/include map.cpp -o map.o

g++ -o map -L/opt/amdstream/lib/x86_64 -lOpenCL map.o 



and I run it with NVIDIA platform("NVIDIA Corporation"). What is the argument here, as it means that the API are interchangable from platform's perspective?

Thanks.

 

 

0 Likes
3 Replies
nou
Exemplar

that is WHOLE POINT of OpenCL. make portable platform independent API which you give GPGPU computing capabilities. geeze.

0 Likes

AFAIK we get the NV's OpenCL implementation with the Driver itself. So at runtime we the proper implementation is selected and the code runs fine.

 So it is expected to work IMHO.

0 Likes

The run time you link to is just stubs. The real work is done in the platform-specific DLL that it loads, and that is loaded after the platform is chosen. The API calls are standard, the code is standard. If you follow the spec it should just work.

Of course, for performance you will almost certainly do device-specific optimisations, and those will not be portable by definition.

0 Likes