[Openmp-commits] [openmp] e3d9a44 - [OpenMP] Account for dynamic shared memory in the AMDGPU nextgen plugin
Johannes Doerfert via Openmp-commits
openmp-commits at lists.llvm.org
Mon Dec 19 19:11:07 PST 2022
Author: Johannes Doerfert
Date: 2022-12-19T19:09:44-08:00
New Revision: e3d9a448c57c46600db635244792205f7a0ea58b
URL: https://github.com/llvm/llvm-project/commit/e3d9a448c57c46600db635244792205f7a0ea58b
DIFF: https://github.com/llvm/llvm-project/commit/e3d9a448c57c46600db635244792205f7a0ea58b.diff
LOG: [OpenMP] Account for dynamic shared memory in the AMDGPU nextgen plugin
Added:
Modified:
openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
Removed:
################################################################################
diff --git a/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp b/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
index b9c38778fbc1..901b9979bc4f 100644
--- a/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
+++ b/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
@@ -400,6 +400,10 @@ struct AMDGPUKernelTy : public GenericKernelTy {
return Err;
}
+ // Account for user requested dynamic shared memory.
+ // TODO: This should be read from a per-kernel state flag.
+ GroupSize += Device.getDynamicMemorySize();
+
// Make sure it is a kernel symbol.
if (SymbolType != HSA_SYMBOL_KIND_KERNEL)
return Plugin::error("Symbol %s is not a kernel function");
More information about the Openmp-commits
mailing list