Hi, Pocl's CPU driver does not touch the affinity, by default. IOW it leaves it to the kernel. By default it creates as much threads as there are logical CPU cores; this can be limited by POCL_MAX_PTHREAD_COUNT env variable.
If you want to force Pocl to set the affinity of threads, set POCL_AFFINITY env var to 1. As for: "When subdevices are created using CL_DEVICE_PARTITION_EQUALLY, the number of utilised cores seems to be one less than actually specified" This has been discussed already in https://github.com/pocl/pocl/issues/716. The short version is that while kernel commands are split and processed on all driver threads, the other commands (clReadBuffer) are never split, and are processed in a single thread. Regards, -- mb ________________________________ From: Srijeeta Maity <[email protected]> Sent: Wednesday, April 1, 2020 5:49 PM To: [email protected] <[email protected]> Subject: [pocl-devel] Subdevices andCPU affinity mismatch Hello, I found some observation while checking the CPU core affinity after creating OpenCL subdevices using PoCL. 1. I created 8 subdevices in a platform having 8CPU cores (Odroid XU4) and assigned some tasks on different subdevices . I checked with htop that the device affinity of those subdevices is not constant for the whole runtime (i.e. it is reset from time to time). 2. Some of those subdevices seem to be set to the same affinity. This can also be a side effect of the refresh rate in htop, so that I am not able to see when the affinity has changed. 3. When subdevices are created using CL_DEVICE_PARTITION_EQUALLY, the number of utilised cores seems to be one less than actually specified (i.e. partition equally to subdevices each having 4 compute units, will actually only use 3 cpu cores). While checking for solution I found there was a similar bug reported for OpenCL in 2013. https://software.intel.com/en-us/forums/opencl/topic/377784 Can you please share some pointer to solve this issue? Thanks and regards, Srijeeta
_______________________________________________ pocl-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pocl-devel
