From 58afea607c54bc36befa2a41224b9d1cfa422a0d Mon Sep 17 00:00:00 2001 From: ROCm CI Service Account <66695075+rocm-ci@users.noreply.github.com> Date: Wed, 28 Jun 2023 21:44:30 +0530 Subject: [PATCH] SWDEV-398174,SWDEV-398655,SWDEV-402054 - Fix runKernelForDuration() for Windows (#333) Change-Id: If0cb99aa66a132c8228fd0a6bb56fdf644a99eae [ROCm/hip-tests commit: a6ed21522de31cf8bb779ac1fb47845c6369311b] --- projects/hip-tests/catch/include/hip_test_common.hh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/projects/hip-tests/catch/include/hip_test_common.hh b/projects/hip-tests/catch/include/hip_test_common.hh index 7f9e859cd0..d4c44a813f 100644 --- a/projects/hip-tests/catch/include/hip_test_common.hh +++ b/projects/hip-tests/catch/include/hip_test_common.hh @@ -352,13 +352,13 @@ template <> struct MemTraits { 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(prop.clockRate); // in kHz - clock_t clockTicksPerSecond = devFreq * 1000; + size_t devFreq = static_cast(prop.clockRate); // in kHz + size_t clockTicksPerSecond = devFreq * 1000; // init hipEvent_t start, stop;