Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

Journeyman III

clGetPlatformIDs - when would it return more than one platform?

What would it mean to have more than one platform available in response to the clGetPlatformIDs call? The platform corresponds to the host plus compute device(s), so I'm confused under what circumstances you would have multiple hosts? Perhaps a cluster, where the call is executed on the "master"?

Alternatively, could you somehow have different vendor platforms on a single host?

2 Replies
Adept I

Ideally you can have more than one platform, but currently all vendors are shipping their own platform dlls which means you will be able to see only one platform.

The status from Khronos is unknown as of now.

Journeyman III

A platform amounts to an OpenCL "driver". Every vendor that ships some kind of device capable of delivering generic computation resources could in theory supply an OpenCL platform dll.

Your observation that the platform corresponds to "the host + compute devices" is not necessarily transferrable to all platforms, it just happens to be the way AMD has designed their platform. It's perfectly ok to separate out the host into its own platform for example, then the only way you'd see several devices in the platform with compute devices is if you happened to have multiple compute devices from one vendor.

I suppose the reason the host is included has to do with it not being possible to create contexts with compute devices from different platforms, or something like that, so it may involve a bit more work for the programmer to make devices work together across platforms.