SWDEV-398174,SWDEV-398655,SWDEV-402054 - Fix runKernelForDuration() for Windows (#333)

Change-Id: If0cb99aa66a132c8228fd0a6bb56fdf644a99eae

[ROCm/hip-tests commit: a6ed21522d]
This commit is contained in:
ROCm CI Service Account
2023-06-28 21:44:30 +05:30
gecommit door GitHub
bovenliggende 6f035718cc
commit 58afea607c
@@ -352,13 +352,13 @@ template <> struct MemTraits<MemcpyAsync> {
namespace {
static __global__ void waitKernel(clock_t offset) {
static __global__ void waitKernel(size_t offset) {
auto start = clock();
while ((clock() - start) < offset) {
}
}
static __global__ void waitKernel_gfx11(clock_t offset) {
static __global__ void waitKernel_gfx11(size_t offset) {
#if HT_AMD
auto start = wall_clock64();
while ((wall_clock64() - start) < offset) {
@@ -374,8 +374,8 @@ static size_t findTicksPerSecond() {
int device;
HIP_CHECK(hipGetDevice(&device));
HIP_CHECK(hipGetDeviceProperties(&prop, device));
clock_t devFreq = static_cast<clock_t>(prop.clockRate); // in kHz
clock_t clockTicksPerSecond = devFreq * 1000;
size_t devFreq = static_cast<size_t>(prop.clockRate); // in kHz
size_t clockTicksPerSecond = devFreq * 1000;
// init
hipEvent_t start, stop;