[Openmp-commits] [openmp] [OpenMP] Add missing weak definitions of missing variables (PR #77767)

Dominik Adamski via Openmp-commits openmp-commits at lists.llvm.org
Thu Jan 11 05:33:55 PST 2024


https://github.com/DominikAdamski created https://github.com/llvm/llvm-project/pull/77767

Variables `__omp_rtl_assume_teams_oversubscription` and `__omp_rtl_assume_threads_oversubscription `are used by functions: `__kmpc_distribute_static_loop`, `__kmpc_distribute_for_static_loop `and `__kmpc_for_static_loop`.

>From d48fb6a064f08be0697f714834bcda8f1b813ecd Mon Sep 17 00:00:00 2001
From: Dominik Adamski <dominik.adamski at amd.com>
Date: Thu, 11 Jan 2024 07:25:38 -0600
Subject: [PATCH] [OpenMP] Add missing weak definitions of missing variables

Variables __omp_rtl_assume_teams_oversubscription and
__omp_rtl_assume_threads_oversubscription are used by functions:
__kmpc_distribute_static_loop, __kmpc_distribute_for_static_loop,
__kmpc_for_static_loop.
---
 openmp/libomptarget/DeviceRTL/src/Configuration.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/openmp/libomptarget/DeviceRTL/src/Configuration.cpp b/openmp/libomptarget/DeviceRTL/src/Configuration.cpp
index ab1608b1cfb0ae..c9f95c0def222d 100644
--- a/openmp/libomptarget/DeviceRTL/src/Configuration.cpp
+++ b/openmp/libomptarget/DeviceRTL/src/Configuration.cpp
@@ -23,6 +23,8 @@ using namespace ompx;
 [[gnu::weak]] extern const uint32_t __omp_rtl_debug_kind = 0;
 [[gnu::weak]] extern const uint32_t __omp_rtl_assume_no_thread_state = 0;
 [[gnu::weak]] extern const uint32_t __omp_rtl_assume_no_nested_parallelism = 0;
+[[gnu::weak]] extern const uint32_t __omp_rtl_assume_threads_oversubscription = 0;
+[[gnu::weak]] extern const uint32_t __omp_rtl_assume_teams_oversubscription = 0;
 
 // This variable should be visibile to the plugin so we override the default
 // hidden visibility.



More information about the Openmp-commits mailing list