Hi all, In order to add a more flexible device detection some rework, is needed. Currently, the device probing is "simulated" using POCL_DEVICES environement variable.
In order to achieve more flexibility, here is a proposition. Each device driver would have a "probe" operation: unsigned int (*probe)(); This operation will be call once in the execution init and will return the number of available devices for this driver. With this setup, pthread could for instance use a PTRHEAD_DEVICE_COUNT env var to specify the number of devices in probe function whereas a driver using PCIe cards could probe them procedurally and return the number of detected cards. Regarding arguments, each driver could then implement the argument parsing by itself and hence remove the non-standard POCL_DEVICES* environnement variables. For instance pthread could use PTHREAD_DEVICE0_ARGS to get arguments for pthread device 0. 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. Ideas and comments are welcomed Clément ------------------------------------------------------------------------------ _______________________________________________ pocl-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pocl-devel
