Skip to content

[OpenMP] Add topology and affinity changes for Meteor Lake #91012

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

Merged
merged 1 commit into from
Jul 29, 2024

Conversation

jpeyton52
Copy link
Contributor

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.

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 hw 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
Accomodates 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 topolgies are uniform and
therefore can use the quicker method of inserting caches as
equivalent layers into the topology.
@jpeyton52 jpeyton52 added the openmp:libomp OpenMP host runtime label May 6, 2024
@jpeyton52 jpeyton52 merged commit 77ff969 into llvm:main Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
openmp:libomp OpenMP host runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants