[OpenMP] Add topology and affinity changes for Meteor Lake #91012
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These are Intel-specific changes for the CPUID leaf 31 method for detecting machine topology.
Cleanup known levels usage in x2apicid topology algorithm
Change to be a constant mask of all Intel topology type values.
Take unknown ids into account when sorting them
If a hardware id is unknown, then put further down the hardware thread list so it will take last priority when assigning to threads.
Have sub ids printed out for hardware thread dump
Add caches to topology
New
kmp_cache_ids_t
class helps create cache ids which are then put into the topology table after regular topology type ids have been put in.Allow empty masks in place list creation
Have enumeration information and place list generation take into account that certain hardware threads may be lacking certain layers
Allow different procs to have different number of topology levels
Accommodates possible situation where CPUID.1F has different depth for different hardware threads. Each hardware thread has a topology description which is just a small set of its topology levels. These descriptions are tracked to see if the topology is uniform or not.
Change regular ids with logical ids
Instead of keeping the original sub ids that the x2apicid topology detection algorithm gives, change each id to its logical id which is a number: [0, num_items - 1]. This makes inserting new layers into the topology significantly simpler.
Insert caches into topology
This change takes into account that most topologies are uniform and therefore can use the quicker method of inserting caches as equivalent layers into the topology.