[Openmp-commits] [openmp] [OpenMP] Adding a throttling threshold to bound dependent tasking mem… (PR #82274)
PEREIRA Romain via Openmp-commits
openmp-commits at lists.llvm.org
Fri Feb 23 09:09:51 PST 2024
================
@@ -438,10 +438,9 @@ static kmp_int32 __kmp_push_priority_task(kmp_int32 gtid, kmp_info_t *thread,
__kmp_acquire_bootstrap_lock(&thread_data->td.td_deque_lock);
// Check if deque is full
- if (TCR_4(thread_data->td.td_deque_ntasks) >=
- TASK_DEQUE_SIZE(thread_data->td)) {
- if (__kmp_enable_task_throttling &&
- __kmp_task_is_allowed(gtid, __kmp_task_stealing_constraint, taskdata,
+ if (__kmp_enable_task_throttling && TCR_4(thread_data->td.td_deque_ntasks) >=
+ __kmp_task_maximum_ready_per_thread) {
+ if (__kmp_task_is_allowed(gtid, __kmp_task_stealing_constraint, taskdata,
----------------
rpereira-dev wrote:
oh and...
#### On the broken logic
Yes I broke that sorry! I reverted modifications.
This section of the runtime is related to differing tasks with a priority.
These queues are "per team" (and not "per thread") - so it makes sense to ignore the newly `KMP_TASK_MAXIMUM_READY_PER_THREAD` parameter anyway
So the current behavior is preserved (if the queue for the given priority is full and throttling is enabled, throttle, else resize the queue)
https://github.com/llvm/llvm-project/pull/82274
More information about the Openmp-commits
mailing list