[Openmp-commits] [openmp] [OpenMP] Disable load balance on Haiku (PR #136082)
Brad Smith via Openmp-commits
openmp-commits at lists.llvm.org
Wed Apr 16 22:16:14 PDT 2025
https://github.com/brad0 created https://github.com/llvm/llvm-project/pull/136082
Haiku does not have a means of retrieving the desired information
and the -1 setting causes the code to fallback anyway.
>From 5680e55c0c9484e3e819e863868fa473d8cf3757 Mon Sep 17 00:00:00 2001
From: Brad Smith <brad at comstyle.com>
Date: Thu, 17 Apr 2025 01:09:51 -0400
Subject: [PATCH] [OpenMP] Disable load balance on Haiku
Haiku does not have a means of retrieving the desired information
and the -1 setting causes the code to fallback anyway.
---
openmp/runtime/src/kmp_config.h.cmake | 2 +-
openmp/runtime/src/z_Linux_util.cpp | 4 ----
2 files changed, 1 insertion(+), 5 deletions(-)
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