[Openmp-commits] [PATCH] D112475: [OpenMP][Offloading] Only get trip count if team construct

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Oct 25 11:16:21 PDT 2021

tianshilei1992 created this revision.
tianshilei1992 added reviewers: jdoerfert, grokos, JonChesterfield.
Herald added subscribers: guansong, yaxunl.
tianshilei1992 requested review of this revision.
Herald added subscribers: openmp-commits, sstefan1.
Herald added a project: OpenMP.

  rG LLVM Github Monorepo



Index: openmp/libomptarget/src/omptarget.cpp
--- openmp/libomptarget/src/omptarget.cpp
+++ openmp/libomptarget/src/omptarget.cpp
@@ -1441,9 +1441,6 @@
-  // Get loop trip count
-  uint64_t LoopTripCount = getLoopTripCount(DeviceId);
   // Launch device execution.
   void *TgtEntryPtr = TargetTable->EntriesBegin[TM->Index].addr;
   DP("Launching target execution %s with pointer " DPxMOD " (index=%d).\n",
@@ -1455,7 +1452,7 @@
     if (IsTeamConstruct)
       Ret = Device.runTeamRegion(TgtEntryPtr, &TgtArgs[0], &TgtOffsets[0],
                                  TgtArgs.size(), TeamNum, ThreadLimit,
-                                 LoopTripCount, AsyncInfo);
+                                 getLoopTripCount(DeviceId), AsyncInfo);
       Ret = Device.runRegion(TgtEntryPtr, &TgtArgs[0], &TgtOffsets[0],
                              TgtArgs.size(), AsyncInfo);

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112475.382067.patch
Type: text/x-patch
Size: 962 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20211025/5aa61d19/attachment.bin>

More information about the Openmp-commits mailing list