This is an archive of the discontinued LLVM Phabricator instance.

Teach OpenMP Library to use Hwloc on Windows
ClosedPublic

Authored by jlpeyton on Jun 16 2016, 11:48 AM.

Details

Summary

This patch allows a user to enable Hwloc on windows. There are three main changes in here:

  1. kmp.h - Move definitions/declarations out of KMP_OS_WINDOWS guard (our windows implementation of affinity) because they need to be defined when KMP_USE_HWLOC is on as well.
  2. teach __kmp_set_system_affinity, __kmp_get_system_affinity, __kmp_get_proc_group, and __kmp_affinity_bind_thread how to use hwloc.
  3. teach CMake how to include hwloc when building Windows

Another minor change in here is to make sure that anything under KMP_USE_HWLOC
is also guarded by KMP_AFFINITY_SUPPORTED as well. This is to prevent Mac
builds from requiring anything from Hwloc.

Diff Detail

Repository
rL LLVM

Event Timeline

jlpeyton updated this revision to Diff 61000.Jun 16 2016, 11:48 AM
jlpeyton retitled this revision from to Teach OpenMP Library to use Hwloc on Windows.
jlpeyton updated this object.
jlpeyton added reviewers: tlwilmar, AndreyChurbanov.
jlpeyton set the repository for this revision to rL LLVM.
jlpeyton added a subscriber: openmp-commits.
tlwilmar accepted this revision.Jun 16 2016, 12:39 PM
tlwilmar edited edge metadata.

LGTM

This revision is now accepted and ready to land.Jun 16 2016, 12:39 PM
This revision was automatically updated to reflect the committed changes.