aboutsummaryrefslogtreecommitdiff
path: root/openmp/runtime/src/kmp_affinity.cpp
diff options
context:
space:
mode:
authornawrinsu <nawrin.sultana@intel.com>2025-04-02 00:17:50 -0700
committerGitHub <noreply@github.com>2025-04-02 00:17:50 -0700
commit730e8a4a59a5398f61c526eb00eb409e9306d19c (patch)
treeb10e19ee8a8e939f9ab3ee6efe35e047d1f6b865 /openmp/runtime/src/kmp_affinity.cpp
parent536fe74aaac437e147fc64dada6af8aab79a8b54 (diff)
downloadllvm-730e8a4a59a5398f61c526eb00eb409e9306d19c.zip
llvm-730e8a4a59a5398f61c526eb00eb409e9306d19c.tar.gz
llvm-730e8a4a59a5398f61c526eb00eb409e9306d19c.tar.bz2
[OpenMP] Add memory allocation using hwloc (#132843)
This patch adds support for memory allocation using hwloc. To enable memory allocation using hwloc, env KMP_TOPOLOGY_METHOD=hwloc needs to be used. If hwloc is not supported/available, allocation will fallback to default path.
Diffstat (limited to 'openmp/runtime/src/kmp_affinity.cpp')
-rw-r--r--openmp/runtime/src/kmp_affinity.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/openmp/runtime/src/kmp_affinity.cpp b/openmp/runtime/src/kmp_affinity.cpp
index c3d5ecf..f2520db 100644
--- a/openmp/runtime/src/kmp_affinity.cpp
+++ b/openmp/runtime/src/kmp_affinity.cpp
@@ -1444,6 +1444,7 @@ void KMPAffinity::pick_api() {
if (__kmp_affinity_top_method == affinity_top_method_hwloc &&
__kmp_affinity.type != affinity_disabled) {
affinity_dispatch = new KMPHwlocAffinity();
+ __kmp_hwloc_available = true;
} else
#endif
{