[Openmp-commits] [PATCH] D110180: [OpenMP] Add support for changing stack size in device RTL

Joseph Huber via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Sep 22 09:55:04 PDT 2021


jhuber6 added inline comments.


================
Comment at: openmp/libomptarget/plugins/cuda/src/rtl.cpp:1240
+      DynamicSharedMemory +=
+          RoundUp(KernelInfo->StackSize, 8) +
+          RoundUp(CudaThreadsPerBlock, DeviceData[DeviceId].WarpSize);
----------------
tianshilei1992 wrote:
> `+`? Not `*`?
This is a linear region of memory, we allocate a byte per-thread to save the memory usage per-thread. This allocated enough memory for the stack, and enough memory for all threads that are active.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110180/new/

https://reviews.llvm.org/D110180



More information about the Openmp-commits mailing list