From 8c88657993b3d3d6820e170ac846032a0cb0dc52 Mon Sep 17 00:00:00 2001 From: "Manocha, Rahul" Date: Wed, 16 Jul 2025 16:37:23 -0700 Subject: [PATCH] SWDEV-535070 - Fix compilation error due to unused variable (#418) Co-authored-by: Rahul Manocha [ROCm/hip-tests commit: 0c318b4ca51378248f1e10e3df5f95022ba6c367] --- projects/hip-tests/catch/unit/clock/hipClockCheck.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/projects/hip-tests/catch/unit/clock/hipClockCheck.cc b/projects/hip-tests/catch/unit/clock/hipClockCheck.cc index 3f303a14a0..457b63578e 100644 --- a/projects/hip-tests/catch/unit/clock/hipClockCheck.cc +++ b/projects/hip-tests/catch/unit/clock/hipClockCheck.cc @@ -54,7 +54,7 @@ bool verify_time_execution(float ratio, float time1, float time2, float expected bool test_status = false; #if (HT_WIN == 1) - if (time1 > expected_time1 && time2 > expected_time2) { + if (time1 > ratio * expected_time1 && time2 > ratio * expected_time2) { #else if (fabs(time1 - expected_time1) < (ratio * expected_time1) && fabs(time2 - expected_time2) < (ratio * expected_time2)) { @@ -102,7 +102,11 @@ bool kernel_time_execution(void (*kernel)(int, uint64_t), int clock_rate, uint64 HIP_CHECK(hipEventDestroy(start_event2)); HIP_CHECK(hipEventDestroy(end_event2)); +#if HT_WIN == 1 + float ratio = 1.0f; +#else float ratio = kernel == kernel_wc64 ? 0.01 : 0.5; +#endif return verify_time_execution(ratio, time1, time2, expected_time1, expected_time2); }