You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
clpeak use ctx.getInfo<CL_CONTEXT_DEVICES>() interface to get devices.
It will call OpenCL C API clCreateContextFromType eventually.
There is a description about clCreateContextFromType in OpenCL specification "clCreateContextFromType may return all or a subset of the actual physical devices present in the platform and that match device_type."
So on some platform, this method can't get all the devices.
There is another interface platform.getDevices() which also can get devices.
It will call OpenCL C API clGetDeviceIDs eventually.
Actually, clGetDeviceIDs also has similar description in the specification "clGetDeviceIDs may return all or a subset of the actual physical devices present in the platform and that match device_type."
We don't know which interface can return more devices on different platform.
So my idea is: we can call these two interfaces and use the one which returns more devices to get better compatibility.
Here is the patch I worked out clpeak_diff.txt
Can you give some suggestion for this issue and do you think this solution is acceptable?
The text was updated successfully, but these errors were encountered:
Hi,
clpeak use ctx.getInfo<CL_CONTEXT_DEVICES>() interface to get devices.
It will call OpenCL C API clCreateContextFromType eventually.
There is a description about clCreateContextFromType in OpenCL specification "clCreateContextFromType may return all or a subset of the actual physical devices present in the platform and that match device_type."
So on some platform, this method can't get all the devices.
There is another interface platform.getDevices() which also can get devices.
It will call OpenCL C API clGetDeviceIDs eventually.
Actually, clGetDeviceIDs also has similar description in the specification "clGetDeviceIDs may return all or a subset of the actual physical devices present in the platform and that match device_type."
We don't know which interface can return more devices on different platform.
So my idea is: we can call these two interfaces and use the one which returns more devices to get better compatibility.
Here is the patch I worked out clpeak_diff.txt
Can you give some suggestion for this issue and do you think this solution is acceptable?
The text was updated successfully, but these errors were encountered: