[Openmp-commits] [PATCH] D40357: Enable thread affinity for Power

Jonas Hahnfeld via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Dec 8 07:07:43 PST 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL320151: Fix thread affinity on non-x86 Linux (authored by Hahnfeld).

Changed prior to commit:
  https://reviews.llvm.org/D40357?vs=123944&id=126145#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D40357

Files:
  openmp/trunk/runtime/src/kmp_affinity.cpp
  openmp/trunk/runtime/src/kmp_os.h


Index: openmp/trunk/runtime/src/kmp_os.h
===================================================================
--- openmp/trunk/runtime/src/kmp_os.h
+++ openmp/trunk/runtime/src/kmp_os.h
@@ -61,7 +61,7 @@
 #error Unknown compiler
 #endif
 
-#if (KMP_OS_LINUX || KMP_OS_WINDOWS) && !KMP_OS_CNK && !KMP_ARCH_PPC64
+#if (KMP_OS_LINUX || KMP_OS_WINDOWS) && !KMP_OS_CNK
 #define KMP_AFFINITY_SUPPORTED 1
 #if KMP_OS_WINDOWS && KMP_ARCH_X86_64
 #define KMP_GROUP_AFFINITY 1
@@ -859,9 +859,6 @@
 #endif
 
 // Switches for OSS builds
-#ifndef USE_SYSFS_INFO
-#define USE_SYSFS_INFO 0
-#endif
 #ifndef USE_CMPXCHG_FIX
 #define USE_CMPXCHG_FIX 1
 #endif
Index: openmp/trunk/runtime/src/kmp_affinity.cpp
===================================================================
--- openmp/trunk/runtime/src/kmp_affinity.cpp
+++ openmp/trunk/runtime/src/kmp_affinity.cpp
@@ -2030,7 +2030,7 @@
         if (threadInfo[num_avail][osIdIndex] != UINT_MAX)
           goto dup_field;
         threadInfo[num_avail][osIdIndex] = val;
-#if KMP_OS_LINUX && USE_SYSFS_INFO
+#if KMP_OS_LINUX && !(KMP_ARCH_X86 || KMP_ARCH_X86_64)
         char path[256];
         KMP_SNPRINTF(
             path, sizeof(path),


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40357.126145.patch
Type: text/x-patch
Size: 1181 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20171208/c36df817/attachment.bin>


More information about the Openmp-commits mailing list