cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

lupescu_grigore
Journeyman III

Multiple platforms

1) To build an OpenCL application one would have to point out the CL sources folder and link against libOpenCL.so. Trouble is (as far as i see it) every platform can see another platform yet of course i'm only linking the library (libOpenCL.so) once. How can one platform detect another platform ? What are the necessary files that need to be present ? Linking against libOpenCL.so makes a difference right ? (i mean i can't use libOpenCL.so 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 libOpenCL.so 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 libOpenCL.so 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

 

Tags (1)
0 Likes
4 Replies
MicahVillmow
Staff
Staff

Multiple platforms

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

Multiple platforms

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 ?

0 Likes
nou
Exemplar

Multiple platforms

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 http://www.khronos.org/registry/cl/extensions/khr/cl_khr_icd.txt

0 Likes
davibu
Journeyman III

Multiple platforms

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).

 

0 Likes