[Openmp-commits] [PATCH] D139373: [OpenMP] Fix dynamic schedule assertion failure on AArch64
Andrey Churbanov via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Wed Jan 11 01:00:41 PST 2023
AndreyChurbanov added inline comments.
================
Comment at: openmp/runtime/src/kmp_dispatch.cpp:1293
if (KMP_ATOMIC_LD_RLX(&v->steal_flag) != READY ||
- v->u.p.count >= (UT)v->u.p.ub) {
+ v->u.p.count >= (UT)v->u.p.ub || v->u.p.steal_lock == NULL) {
pr->u.p.parm4 = (victimId + 1) % nproc; // shift start victim tid
----------------
This change fights with the consequence of the problem, not with the root cause. IMHO, the better fix would be to change
```
if (KMP_ATOMIC_LD_RLX(&v->steal_flag) != READY ||
```
to
```
if (KMP_ATOMIC_LD_ACQ(&v->steal_flag) != READY ||
```
Then the acquire load would synchronize with release store at buffer initialization, that should prevent the steal_lock pointer to ever be NULL here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139373/new/
https://reviews.llvm.org/D139373
More information about the Openmp-commits
mailing list