[Openmp-commits] [openmp] Add openmp support to System z (PR #66081)
Alexandre Eichenberger via Openmp-commits
openmp-commits at lists.llvm.org
Thu Oct 19 09:58:19 PDT 2023
AlexandreEichenberger wrote:
> On IBM Z we have two more levels: books and drawers. This change works around this mismatch by combining socket, book and drawer into one value.
Having authored the original proposal on OMP affinity, there were too many different layouts/options to easily coalesce all possible machine hardware into a simple enough abstraction. In using a single number, number that are close are supposed to be "nearer" than others that are far. There can be discontinuities (e.g. CPUs 0-7 are on one socket, CPU #8 is "near" CPU 7 but will be on a different socket), this is unavoidable.
However, affinity has to be understood in terms of "places". If it is important to have socket affinity, then you may place threads assigned to CPU 0..7 to one OMP place, and threads assigned to CPU 8..15 to a different OMP place. Alternatively, if you want affinity by books or drawer, you may place OMP threads in Places that represent books or drawers.
When initiating a new parallel workspace/region/loop, one may indicate if we want threads to be colocated in the same place, in nearby places, or spread among places.
Hope this helps putting this feature in context.
https://github.com/llvm/llvm-project/pull/66081
More information about the Openmp-commits
mailing list