[Openmp-commits] [PATCH] D139373: Fix dynamic schedule assertion failure on AArch64

Nawrin Sultana via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Dec 5 15:35:26 PST 2022


Nawrin created this revision.
Nawrin added reviewers: tlwilmar, jlpeyton.
Nawrin added a project: OpenMP.
Herald added a subscriber: kristof.beyls.
Herald added a project: All.
Nawrin requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added a subscriber: sstefan1.

This patch fixes assertion failure for dynamic schedule with 8 byte induction variable. It checks the steal lock of selected victim and if the lock is not initialized then pick a different victim to steal from.

The bug report: https://github.com/llvm/llvm-project/issues/54422#issuecomment-1274020428


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D139373

Files:
  openmp/runtime/src/kmp_dispatch.cpp


Index: openmp/runtime/src/kmp_dispatch.cpp
===================================================================
--- openmp/runtime/src/kmp_dispatch.cpp
+++ openmp/runtime/src/kmp_dispatch.cpp
@@ -1290,7 +1290,7 @@
             }
           }
           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
             continue; // no chunks to steal, try next victim
           }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139373.480263.patch
Type: text/x-patch
Size: 581 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20221205/e4b95bc4/attachment-0001.bin>


More information about the Openmp-commits mailing list