Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

Journeyman III

Multiple platforms

1) To build an OpenCL application one would have to point out the CL sources folder and link against Trouble is (as far as i see it) every platform can see another platform yet of course i'm only linking the library ( once. How can one platform detect another platform ? What are the necessary files that need to be present ? Linking against makes a difference right ? (i mean i can't use from nvidia to compile and execute on an amd gpu)  

2) Given a set of devices (Amd CPU, Intel CPU, Amd GPU, Nvidia GPU, Amd APU) what would be the best way to handle execution on one specific unit ? For instance today i compiled against the Nvidia SDK an application, listed the platforms (2 in my case Nvidia & Amd) and ran on the Amd CPU.

3) If do make a difference how would i manage multiple instances of them ? Amd for instance places them in $PATH_SDK/lib/... whlist Nvidia places them directly in /lib and /lib64 of the system as symbolic links. Wouldn't this also be a threat if i would link a from Amd ? ( i mean wouldn't the system look in /lib first and find the nvidia one ? )

4) Cross platform communication through simple C/C++ should be possible right ? (for instance a device from Nvidia communicating with a device from Amd through RAM)


Thank you in advance


4 Replies

libOpenCL.dll/so should be the same file from all vendors. The implementation of this file is maintained by khronos.

Thx. So the question remains how are architectures/platforms detected ? On Linux for instance to install the SDK only a extraction/copy is required.

If i have both a Intel SDK and an Amd SDK i would have then (for instance) Core i3 on both platforms (have not tried it though), right ?


on linux there are icd files in /etc/OpenCL/vendors which points to vendors lib which implements opencl in case of amd it is libamdocl[32|64].so

on windows this is in registers.

for more read speicifcatin of cl_khr_icd


Originally posted by: lupescu_grigoreIf i have both a Intel SDK and an Amd SDK i would have then (for instance) Core i3 on both platforms (have not tried it though), right ?


I'm regularly using AMD OpenCL and Intel OpenCL side by side on a i7+GPUs (with Linux Ubuntu 10.10). They works fine, I see 2 CPU devices: one avilable on AMD OpenCL platform and one on Intel.


I use this setup as test for multi-platform support for my OpenCL code. The code developed with this setup works fine with different multi-platform setup too (i.e. Intel+NVIDIA OpenCL).