[Openmp-commits] [openmp] 06963fb - [OpenMP] Disable load balance on Haiku (#136082)

via Openmp-commits openmp-commits at lists.llvm.org
Thu Apr 17 12:11:36 PDT 2025


Author: Brad Smith
Date: 2025-04-17T15:11:33-04:00
New Revision: 06963fb9c79ae012de5796b73bb810f8da09728e

URL: https://github.com/llvm/llvm-project/commit/06963fb9c79ae012de5796b73bb810f8da09728e
DIFF: https://github.com/llvm/llvm-project/commit/06963fb9c79ae012de5796b73bb810f8da09728e.diff

LOG: [OpenMP] Disable load balance on Haiku (#136082)

Haiku does not have a means of retrieving the desired information
and the -1 setting causes the code to fallback anyway.

Added: 
    

Modified: 
    openmp/runtime/src/kmp_config.h.cmake
    openmp/runtime/src/z_Linux_util.cpp

Removed: 
    


################################################################################
diff  --git a/openmp/runtime/src/kmp_config.h.cmake b/openmp/runtime/src/kmp_config.h.cmake
index b0cd0ed296e7f..d64c9a4b557df 100644
--- a/openmp/runtime/src/kmp_config.h.cmake
+++ b/openmp/runtime/src/kmp_config.h.cmake
@@ -120,7 +120,7 @@
 #define KMP_ASM_INTRINS 1
 #define USE_ITT_BUILD LIBOMP_USE_ITT_NOTIFY
 #define INTEL_ITTNOTIFY_PREFIX __kmp_itt_
-#if ! KMP_MIC
+#if ! (KMP_MIC || KMP_OS_HAIKU)
 # define USE_LOAD_BALANCE 1
 #endif
 #if ! (KMP_OS_WINDOWS || KMP_OS_DARWIN)

diff  --git a/openmp/runtime/src/z_Linux_util.cpp b/openmp/runtime/src/z_Linux_util.cpp
index 87f2711186420..3b82b45e24405 100644
--- a/openmp/runtime/src/z_Linux_util.cpp
+++ b/openmp/runtime/src/z_Linux_util.cpp
@@ -2522,10 +2522,6 @@ int __kmp_get_load_balance(int max) {
   return running_threads;
 }
 
-#elif KMP_OS_HAIKU
-
-int __kmp_get_load_balance(int max) { return -1; }
-
 #else // Linux* OS
 
 // The function returns number of running (not sleeping) threads, or -1 in case


        


More information about the Openmp-commits mailing list