[Openmp-commits] [PATCH] D48286: [OpenMP] [CUDA] Expose teamid to the debug path

Guansong Zhang via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Jun 18 09:30:36 PDT 2018


guansong created this revision.
guansong added a reviewer: grokos.
guansong added a project: OpenMP.

Small bug fix for debug build. A previous fix causing trouble for debug build.


Repository:
  rOMP OpenMP

https://reviews.llvm.org/D48286

Files:
  libomptarget/deviceRTLs/nvptx/src/loop.cu


Index: libomptarget/deviceRTLs/nvptx/src/loop.cu
===================================================================
--- libomptarget/deviceRTLs/nvptx/src/loop.cu
+++ libomptarget/deviceRTLs/nvptx/src/loop.cu
@@ -334,11 +334,11 @@
       else
         __kmpc_barrier(loc, threadId);
       // save sched state
+      int teamId = GetOmpTeamId();
       omptarget_nvptx_threadPrivateContext->ScheduleType(tid) = schedule;
       if (GetThreadIdInBlock() == 0) {
         if (chunk < 1)
           chunk = 1;
-        int teamId = GetOmpTeamId();
         omptarget_nvptx_threadPrivateContext->Chunk(teamId) = chunk;
         omptarget_nvptx_threadPrivateContext->LoopUpperBound(teamId) = ub;
         omptarget_nvptx_threadPrivateContext->NextLowerBound(teamId) = lb;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48286.151732.patch
Type: text/x-patch
Size: 767 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20180618/b9c7e2db/attachment.bin>


More information about the Openmp-commits mailing list