[openmp][amdgpu] Add DynamicLdsSize to AMDGPUImplicitArgsTy (#65325)

#65273 "hidden_dynamic_lds_size" argument will be added in the reserved
section at offset 120 of the implicit argument layout
Add DynamicLdsSize to AMDGPUImplicitArgsTy struct at offset 120 and fill
the dynamic LDS size before kernel launch.

GitOrigin-RevId: 1637c0792550f70e4b2ef42b3d08aa91dd27f4a9
diff --git a/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp b/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
index 0411c67..18076f8 100644
--- a/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
+++ b/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
@@ -3203,6 +3203,7 @@
     ImplArgs->GroupSizeY = 1;
     ImplArgs->GroupSizeZ = 1;
     ImplArgs->GridDims = 1;
+    ImplArgs->DynamicLdsSize = KernelArgs.DynCGroupMem;
   }
 
   // Push the kernel launch into the stream.
diff --git a/libomptarget/plugins-nextgen/amdgpu/utils/UtilitiesRTL.h b/libomptarget/plugins-nextgen/amdgpu/utils/UtilitiesRTL.h
index 2471590..58a3b5d 100644
--- a/libomptarget/plugins-nextgen/amdgpu/utils/UtilitiesRTL.h
+++ b/libomptarget/plugins-nextgen/amdgpu/utils/UtilitiesRTL.h
@@ -45,7 +45,9 @@
   uint16_t GroupSizeZ;
   uint8_t Unused0[46]; // 46 byte offset.
   uint16_t GridDims;
-  uint8_t Unused1[190]; // 190 byte offset.
+  uint8_t Unused1[54]; // 54 byte offset.
+  uint32_t DynamicLdsSize;
+  uint8_t Unused2[132]; // 132 byte offset.
 };
 
 // Dummy struct for COV4 implicitargs.