[Openmp-commits] [PATCH] D44486: [OpenMP][libomptarget] Enable usage of shared memory slots

Phabricator via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Mar 15 09:08:32 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL327639: [OpenMP][libomptarget] Enable usage of shared memory slots (authored by gbercea, committed by ).
Herald added a subscriber: llvm-commits.

Repository:
  rL LLVM

https://reviews.llvm.org/D44486

Files:
  openmp/trunk/libomptarget/deviceRTLs/nvptx/src/data_sharing.cu


Index: openmp/trunk/libomptarget/deviceRTLs/nvptx/src/data_sharing.cu
===================================================================
--- openmp/trunk/libomptarget/deviceRTLs/nvptx/src/data_sharing.cu
+++ openmp/trunk/libomptarget/deviceRTLs/nvptx/src/data_sharing.cu
@@ -342,16 +342,7 @@
 
   DataSharingState.SlotPtr[WID] = RootS;
   DataSharingState.TailPtr[WID] = RootS;
-
-  // Initialize the stack pointer to be equal to the end of
-  // the shared memory slot. This way we ensure that the global
-  // version of the stack will be used.
-  // TODO: remove this:
-  DataSharingState.StackPtr[WID] = RootS->DataEnd;
-
-  // TODO: When the use of shared memory is enabled we will have to
-  // initialize this with the start of the Data region like so:
-  // DataSharingState.StackPtr[WID] = (void *)&RootS->Data[0];
+  DataSharingState.StackPtr[WID] = (void *)&RootS->Data[0];
 
   // We initialize the list of references to arguments here.
   omptarget_nvptx_globalArgs.Init();
@@ -368,11 +359,6 @@
 // Called by: master, TODO: call by workers
 EXTERN void* __kmpc_data_sharing_push_stack(size_t DataSize,
     int16_t UseSharedMemory) {
-  // TODO: Add shared memory support. For now, use global memory only for
-  // storing the data sharing slots so ignore the pre-allocated
-  // shared memory slot.
-
-  // Use global memory for storing the stack.
   if (IsMasterThread()) {
     unsigned WID = getWarpId();
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44486.138574.patch
Type: text/x-patch
Size: 1425 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20180315/c24d8b43/attachment.bin>


More information about the Openmp-commits mailing list