-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CPU binding on MacOS #555
Comments
Hello |
As far as I can understand from docs I've read, Apple's pthread QOS interface allows to (based on reading of qos.h):
Honestly, I don't know how high-level (or low-level) API should be used here. It can be either a possibility to set those QOS classes directly or maybe leave it internal and make hints based on cpukind (e.g. set I am personally interested in using it with threads, so maybe some |
It seems to me that such hwloc functions wouldn't do anything clever, they would only call the equivalent function from MacOS X, why would be the benefit of a hwloc function then? For Linux, the point of functions such as hwloc_linux_set_tid_cpubind() is that they use hwloc cpusets instead of Linux cpusets for describing the binding, hence it's easier to integrate inside an existing hwloc code. |
Maybe it can be some additional logic also based on CPU sets? Like if we specify CPU set with P cores it will use "User interactive" or "User initiated", if we specify CPU set with E cores, it will use "Background" QOS class. If it is something at an intersection, it can be "Utility" QOS class. I am not sure, whether this logic seems reasonable or not, but just for example. I guess the only benefit is having some alternative to real CPU Binding on MacOS and being able to use it as a part of HWLOC. I think it would be easier to fit this functionality into the existing code that uses HWLOC. |
Hi,
AFAIK, CPU binding is not supported on MacOS due to the lack of the necessary interface from Apple.
But still, Apple provide interface to set QOS classes (for example, see
pthread
section at Apple's doc.Is it possible to have some implemented hwloc API that is based on those hints? It would allow to make hints to different core types on hybrid CPUs like Apple M1/M2.
The text was updated successfully, but these errors were encountered: