SWDEV-481514, SWDEV-482400 - Use correct way to add delay/wait on GPU.

Change-Id: I163896333bf741053173d636a499ed6406e77a09
This commit is contained in:
Jaydeep Patel
2024-08-27 10:33:45 +00:00
committed by Rakesh Roy
parent db697c1873
commit 87c8a0417c
2 changed files with 24 additions and 21 deletions
@@ -346,7 +346,12 @@ void ModuleLaunchKernel::AllocateMemory() {
HIP_CHECK(hipMemcpy(Ad, A, SIZE*sizeof(int), hipMemcpyHostToDevice));
HIP_CHECK(hipMemcpy(Bd, B, SIZE*sizeof(int), hipMemcpyHostToDevice));
int clkRate = 0;
#if HT_AMD
HIP_CHECK(hipDeviceGetAttribute(&clkRate, hipDeviceAttributeWallClockRate, 0));
#endif
#if HT_NVIDIA
HIP_CHECK(hipDeviceGetAttribute(&clkRate, hipDeviceAttributeClockRate, 0));
#endif
args1._Ad = Ad;
args1._Bd = Bd;
args1._Cd = C;