Hi,
On 04/04/2014 12:50, Pekka Jääskeläinen wrote:
> Hi Vincent,
>
> On 04/04/2014 01:15 PM, Vincent Danjean wrote:
>> I think that, per default, the pthread driver should return the
>> number of usable cores into the current cpuset.
>
> This is not a good idea in general as it generates one OpenCL
> device per core/HW thread. Then the OpenCL app is required to use
> multiple command queues to exploit all the HW threads in the CPU.
>
> The multithreading of pthread is currently done at the granularity of
> work-groups inside one device instance.
Of courses, you are right. I did not think enough before posting
about the pthread driver.
>> => if possible, using the same syntax and keyword (as must as
>> possible) would be great for users
>
> Yes, if there are earlier conventions on naming the envs, it is
> a good idea to try to mimic them.
This was in fact my main point. But not only on envvar names. Also
on the contents of such envvar.
I do not know enough the pthread driver (as you see in my previous
mail) but I imagine that, at one point, the driver needs to decide
how many threads it will use and on which physical cores they will
run, and how to group them with respect to the physical topology.
OpenMP has to do the same decisions and can be guided by envvar.
So OpenMP envvar (name and contents) can be a great source of
inspiration for the pthread POCL driver.
Regards,
Vincent
>>> Finally, device init operation would also be called only on
>>> clGetDeviceIds/clCreateContext when requesting a specific device in
>>> order to speedup the initialization and use less ressources.
>>
>> There can be an envvar to limit the scanned plateform/devices on
>> enumerating functions (clIcdGetPlatformIDsKHR, clGetDeviceIDs, ...)
>
> This could work well enough for backwards compatibility
> I.e., use POCL_DEVICES only for _limiting_ the set of probed
> devices.
>
------------------------------------------------------------------------------
_______________________________________________
pocl-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pocl-devel