Hi,
Is it supported to make a single context over a multiple cl_device_ids which in turn span multiple cl_platform_ids?
When I try under Windows, it fails with either an access violation or CL_INVALID_DEVICE, depending on which cl_device_ids I include in the call to clCreateContext.
I’ve tried calling clCreateContext with NULL for properties, {CL_CONTEXT_PLATFORM, NULL, 0} and the properties array having one CL_CONTEXT_PLATFORM entry for each cl_platform_id
I get the following platforms/devices returned by clGetPlatformIDs/clGetDeviceIDs on my PC:
Intel
CPU - OpenCL 1.1
nvidia
GPU - OpenCL 1.0
AMD
GPU - OpenCL 1.1
CPU - OpenCL 1.1
For a bonus question, how do I determine at runtime that two cl_device_ids relate to the same physical hardware. In the above list Intel/CPU and AMD/CPU appear as two distinct cl_device_ids but in reality share the same hardware. The only way I could think of was to limit my application to a single CL_DEVICE_TYPE_CPU device and hope that a given platform scaled across all cores of the CPU.
[I looking to run OpenCL across customer hardware over which I have no knowledge, other than that it runs Windows. Therefore all discovery / decisions have to be made at runtime]