-
Notifications
You must be signed in to change notification settings - Fork 144
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
Realm: core->get_resource("cpu", ...) returns 0 on ARM #1783
Comments
Should be fixed by https://gitlab.com/StanfordLegion/legion/-/merge_requests/1511. The reason it works on Mac is because it provides its own API |
@manopapad What ARM system are you running on that doesn't have physical id or cpu cores? We should really just move everything over to hwloc... |
@muraj Do you think if we can assume hwloc is always available if we move to it? I just do not want to introduce an extra dependency with a fallback path. |
we can't assume hwloc is always available I don't think. It's not default available on all distros. |
hwloc supports all systems people usually use, I think we can make it a must have dependency. |
Not without discussing it with the general community. We can ask in the next legion meeting. In the meantime -- @manopapad can you compile and run the following snippet on your target system and verify if it returns the correct number of processors? https://godbolt.org/z/1vTdGxq94 it would return everything that reading /proc/cpuinfo and grepping for processors would return. |
Agree
It returns 72, which is the number of cpu cores on that ARM machine. |
Then instead of parsing /proc/cpuinfo, we should use sysconf() instead. We'll still need /proc/cpuinfo for parsing out which cores are physical and which are hyper-threads, but the total cores should probably come from this sysconf instead. |
I think people usually do not interested in hyper-threads. We can use sysconf to read the total cores, and if we can parse /proc/cpuinfo correctly, we will return the total physical cores, otherwise, we will just return the value of sysconf. |
This work now, but still sometimes runs into trouble:
Hopefully hwloc would be able to figure things out even in this case. |
This error comes from https://gitlab.com/StanfordLegion/legion/-/blob/master/runtime/realm/numa/numasysif.cc#L329. Before adding the hwloc, I will need to test it to make sure hwloc support this linux. |
Apparently
cat /proc/cpuinfo
has no physical id and cpu cores, which is what Realm checks.Note that this works fine on Apple Silicon.
The text was updated successfully, but these errors were encountered: