[PATCH] D40905: Force HWLOC topology method in case user requested NUMA-specific topology via granularity or KMP_HW_SUBSET

Jonathan Peyton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 10 10:33:03 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL322205: Force HWLOC topology method for NUMA-specific topology (authored by jlpeyton, committed by ).
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D40905?vs=125744&id=129305#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D40905

Files:
  openmp/trunk/runtime/src/kmp_settings.cpp


Index: openmp/trunk/runtime/src/kmp_settings.cpp
===================================================================
--- openmp/trunk/runtime/src/kmp_settings.cpp
+++ openmp/trunk/runtime/src/kmp_settings.cpp
@@ -5126,6 +5126,15 @@
 #if KMP_AFFINITY_SUPPORTED
 
   if (!TCR_4(__kmp_init_middle)) {
+#if KMP_USE_HWLOC
+    // Force using hwloc when either tiles or numa nodes requested within
+    // KMP_HW_SUBSET and no other topology method is requested
+    if ((__kmp_hws_node.num > 0 || __kmp_hws_tile.num > 0 ||
+         __kmp_affinity_gran == affinity_gran_tile) &&
+        (__kmp_affinity_top_method == affinity_top_method_default)) {
+      __kmp_affinity_top_method = affinity_top_method_hwloc;
+    }
+#endif
     // Determine if the machine/OS is actually capable of supporting
     // affinity.
     const char *var = "KMP_AFFINITY";


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40905.129305.patch
Type: text/x-patch
Size: 849 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180110/0a1a4707/attachment.bin>


More information about the llvm-commits mailing list