Skip to content

Commit e483e26

Browse files
committed
[OpenMP][AMDGPU] Add DynamicLdsSize to AMDGPUImplicitArgsTy(#65325)
Add DynamicLdsSize to AMDGPUImplicitArgsTy struct at offset 120 and fill the dynamic LDS size before kernel launch.
1 parent 2873060 commit e483e26

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3203,6 +3203,7 @@ Error AMDGPUKernelTy::launchImpl(GenericDeviceTy &GenericDevice,
32033203
ImplArgs->GroupSizeY = 1;
32043204
ImplArgs->GroupSizeZ = 1;
32053205
ImplArgs->GridDims = 1;
3206+
ImplArgs->DynamicLdsSize = KernelArgs.DynCGroupMem;
32063207
}
32073208

32083209
// Push the kernel launch into the stream.

openmp/libomptarget/plugins-nextgen/amdgpu/utils/UtilitiesRTL.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ struct AMDGPUImplicitArgsTy {
4545
uint16_t GroupSizeZ;
4646
uint8_t Unused0[46]; // 46 byte offset.
4747
uint16_t GridDims;
48-
uint8_t Unused1[190]; // 190 byte offset.
48+
uint8_t Unused1[54]; // 54 byte offset.
49+
uint32_t DynamicLdsSize;
50+
uint8_t Unused2[132]; // 132 byte offset.
4951
};
5052

5153
// Dummy struct for COV4 implicitargs.

0 commit comments

Comments
 (0)