[llvm-bugs] [Bug 46193] New: Dependencies for undeferred tasks are blocking
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Jun 4 02:04:18 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=46193
Bug ID: 46193
Summary: Dependencies for undeferred tasks are blocking
Product: OpenMP
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Clang Compiler Support
Assignee: unassignedclangbugs at nondot.org
Reporter: protze at itc.rwth-aachen.de
CC: llvm-bugs at lists.llvm.org
Created attachment 23573
--> https://bugs.llvm.org/attachment.cgi?id=23573&action=edit
reproducer
Other than https://bugs.llvm.org/show_bug.cgi?id=46185, this is no correctness
issue, but a possible performance issue.
Clang transforms undeferred tasks semantically like this:
#pragma omp task depend(...) if(0)
to:
#pragma omp taskwait depend(...)
#pragma omp task if(0)
As stated in the previous issue, this is only valid for in/inout/out
dependencies in absense of a detached clause.
The dependency mutexinoutset would allow the undeferred task to execute unless
another task with the same dependency is currently running. In the attached
code, the second task is blocked by the dependency to the first task. The third
task executes right away. The forth task could execute, but waits for the
second task to finish.
>From my perspective, we should not use the _if0 runtime entry points in those
scenarios, but rather just mark the created task as undeferred and let the
runtime manage the execution.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200604/ab719118/attachment-0001.html>
More information about the llvm-bugs
mailing list