Open Quuxplusone opened 3 years ago
Bugzilla Link | PR50739 |
Status | CONFIRMED |
Importance | P enhancement |
Reported by | Michael Kruse (llvm@meinersbur.de) |
Reported on | 2021-06-16 08:02:07 -0700 |
Last modified on | 2021-06-16 10:41:35 -0700 |
Version | unspecified |
Hardware | PC Linux |
CC | herve@ic.unicamp.br, llvm-bugs@lists.llvm.org, tianshilei1992@gmail.com |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | PR49940 |
See also |
For the nvptx backend, it is covered https://bugs.llvm.org/show_bug.cgi?id=49940.
We could potentially use this tracker for the x86 host offloading.
Thanks for the bug49940 link.
It seems that this problem (and the proposed quickfix https://bugs.llvm.org/show_bug.cgi?id=49940#c8) affects all offload plugins, not just nvptx or x86. If this is the case, thus bug could be marked as a duplicate.
Well, what is discussed in https://bugs.llvm.org/show_bug.cgi?id=49940 is about the data race introduced by async data movement, but x86 host offloading doesn't support it. Therefore I think x86 failure should be caused by another problem. We can use this tracker for an overall view.
(In reply to Shilei Tian from comment #3)
> Well, what is discussed in https://bugs.llvm.org/show_bug.cgi?id=49940 is
> about the data race introduced by async data movement, but x86 host
> offloading doesn't support it. Therefore I think x86 failure should be
> caused by another problem. We can use this tracker for an overall view.
Shilei, just a detail: x86 plugin does support running multiple target tasks in
parallel so the race condition in HostDataToTarget Map happens for this plugin
as well. In fact, you only need to have target nowait kernel running
concurrently which will create multiple OpenMP threads doing offloading in
parallel.
I believe that it is important not to mix up the asynchronicity induced by the
"target nowait" and the one induced by the async functions of libomptarget.
However, I agree that the other race condition related to the async queue does
not concern the x86 plugin.