[Openmp-commits] [openmp] [openmp][amdgpu] Add DynamicLdsSize to AMDGPUImplicitArgsTy (PR #65325)

via Openmp-commits openmp-commits at lists.llvm.org
Mon Sep 25 04:46:44 PDT 2023


https://github.com/skc7 updated https://github.com/llvm/llvm-project/pull/65325

>From 34c394c3376efb249b4eb64a4b8484b1e255b78c Mon Sep 17 00:00:00 2001
From: skc7 <Krishna.Sankisa at amd.com>
Date: Tue, 5 Sep 2023 14:46:05 +0530
Subject: [PATCH] [openmp][amdgpu] Add DynamicLdsSize to AMDGPUImplicitArgsTy

---
 openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp         | 1 +
 .../libomptarget/plugins-nextgen/amdgpu/utils/UtilitiesRTL.h   | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp b/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
index 66a25e29d016276..da2b3021728f9bb 100644
--- a/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
+++ b/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
@@ -3031,6 +3031,7 @@ Error AMDGPUKernelTy::launchImpl(GenericDeviceTy &GenericDevice,
     ImplArgs->GroupSizeY = 1;
     ImplArgs->GroupSizeZ = 1;
     ImplArgs->GridDims = 1;
+    ImplArgs->DynamicLdsSize = KernelArgs.DynCGroupMem;
   }
 
   // Push the kernel launch into the stream.
diff --git a/openmp/libomptarget/plugins-nextgen/amdgpu/utils/UtilitiesRTL.h b/openmp/libomptarget/plugins-nextgen/amdgpu/utils/UtilitiesRTL.h
index b39545ab7d02ba2..d9828f0aa37a912 100644
--- a/openmp/libomptarget/plugins-nextgen/amdgpu/utils/UtilitiesRTL.h
+++ b/openmp/libomptarget/plugins-nextgen/amdgpu/utils/UtilitiesRTL.h
@@ -43,7 +43,8 @@ struct AMDGPUImplicitArgsTy {
   uint16_t GroupSizeZ;
   uint8_t Unused0[46]; // 46 byte offset.
   uint16_t GridDims;
-  uint8_t Unused1[190]; // 190 byte offset.
+  uint32_t DynamicLdsSize;
+  uint8_t Unused1[186]; // 186 byte offset.
 };
 
 // Dummy struct for COV4 implicitargs.



More information about the Openmp-commits mailing list