Page MenuHomePhabricator

Dynamic affinity dispatch capabilities.
ClosedPublic

Authored by jlpeyton on Nov 7 2016, 10:44 AM.

Details

Summary

This set of changes enables the affinity interface (Either the preexisting native operating system or HWLOC) to be dynamically set at runtime initialization. The point of this change is that we were seeing performance degradations when using HWLOC. This allows the user to use the old affinity mechanisms which on large machines (>64 cores) makes a large difference in initialization time.

These changes mostly move affinity code under a small class hierarchy:

KMPAffinity {
  class Mask {}
};
KMPNativeAffinity : public KMPAffinity {
  class Mask : public KMPAffinity::Mask {}
};
KMPHwlocAffinity {
  class Mask : public KMPAffinity::Mask {}
}

Since all interface functions (for both affinity and the mask implementation) are virtual, the implementation can be chosen at runtime initialization.

Diff Detail

Repository
rL LLVM

Event Timeline

jlpeyton updated this revision to Diff 77057.Nov 7 2016, 10:44 AM
jlpeyton retitled this revision from to Dynamic affinity dispatch capabilities..
jlpeyton updated this object.
jlpeyton added reviewers: AndreyChurbanov, tlwilmar.
jlpeyton set the repository for this revision to rL LLVM.
jlpeyton added a subscriber: openmp-commits.
tlwilmar accepted this revision.Nov 10 2016, 1:00 PM
tlwilmar edited edge metadata.

LGTM

This revision is now accepted and ready to land.Nov 10 2016, 1:00 PM
This revision was automatically updated to reflect the committed changes.