[Openmp-commits] [PATCH] D118625: [Libomptarget] Reduce shared memory stack size to 512 and a message when it is exceeded
Joseph Huber via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Mon Jan 31 12:20:06 PST 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rGfd5853dae6b9: [Libomptarget] Reduce shared memory stack size to 512 and a message when it is… (authored by jhuber6).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118625/new/
https://reviews.llvm.org/D118625
Files:
openmp/libomptarget/DeviceRTL/CMakeLists.txt
openmp/libomptarget/DeviceRTL/src/State.cpp
Index: openmp/libomptarget/DeviceRTL/src/State.cpp
===================================================================
--- openmp/libomptarget/DeviceRTL/src/State.cpp
+++ openmp/libomptarget/DeviceRTL/src/State.cpp
@@ -136,6 +136,9 @@
return Ptr;
}
+ if (config::isDebugMode(config::DebugKind::CommonIssues))
+ PRINT("Shared memory stack full, fallback to dynamic allocation of global "
+ "memory will negatively impact performance.");
void *GlobalMemory = memory::allocGlobal(
AlignedBytes, "Slow path shared memory allocation, insufficient "
"shared memory stack memory!");
Index: openmp/libomptarget/DeviceRTL/CMakeLists.txt
===================================================================
--- openmp/libomptarget/DeviceRTL/CMakeLists.txt
+++ openmp/libomptarget/DeviceRTL/CMakeLists.txt
@@ -122,7 +122,7 @@
${source_directory}/Workshare.cpp
)
-set(clang_opt_flags -O1 -mllvm -openmp-opt-disable -DSHARED_SCRATCHPAD_SIZE=2048)
+set(clang_opt_flags -O1 -mllvm -openmp-opt-disable -DSHARED_SCRATCHPAD_SIZE=512)
set(link_opt_flags -O1 -openmp-opt-disable)
# Prepend -I to each list element
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118625.404664.patch
Type: text/x-patch
Size: 1165 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20220131/5eeac743/attachment-0001.bin>
More information about the Openmp-commits
mailing list