From bf26f1d052259e22dfe80171df1375c9251d8ea2 Mon Sep 17 00:00:00 2001 From: Satyanvesh Dittakavi Date: Thu, 27 Jun 2024 15:21:04 +0000 Subject: [PATCH] SWDEV-469387 - Fix and enable the test Unit_hipWallClock64_Positive_Basic Change-Id: I0a6802619e18967da574a610efef8412449bab41 [ROCm/hip-tests commit: 3f28dd3b0833b9102fffdb0cde2d4f7cb2479b5c] --- projects/hip-tests/catch/unit/CMakeLists.txt | 4 ++-- projects/hip-tests/catch/unit/clock/hipClockCheck.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/projects/hip-tests/catch/unit/CMakeLists.txt b/projects/hip-tests/catch/unit/CMakeLists.txt index d43e957c42..7f4884d9ac 100644 --- a/projects/hip-tests/catch/unit/CMakeLists.txt +++ b/projects/hip-tests/catch/unit/CMakeLists.txt @@ -55,7 +55,7 @@ add_subdirectory(virtualMemoryManagement) if(HIP_PLATFORM STREQUAL "amd") add_subdirectory(callback) -#add_subdirectory(clock) +add_subdirectory(clock) add_subdirectory(hip_specific) # Vulkan interop APIs currently undefined for Nvidia add_subdirectory(vulkan_interop) @@ -63,4 +63,4 @@ add_subdirectory(gl_interop) # Disabled on NVIDIA due to defect - EXSWHTEC-246 endif() add_subdirectory(synchronization) add_subdirectory(launchBounds) -add_subdirectory(assertion) \ No newline at end of file +add_subdirectory(assertion) diff --git a/projects/hip-tests/catch/unit/clock/hipClockCheck.cc b/projects/hip-tests/catch/unit/clock/hipClockCheck.cc index 0c1306eec0..0c6cdee14c 100644 --- a/projects/hip-tests/catch/unit/clock/hipClockCheck.cc +++ b/projects/hip-tests/catch/unit/clock/hipClockCheck.cc @@ -53,8 +53,8 @@ bool verify_time_execution(float ratio, float time1, float time2, float expected float expected_time2) { bool test_status = false; - if (fabs(time1 - expected_time1) < ratio * expected_time1 && - fabs(time2 - expected_time2) < ratio * expected_time2) { + if (fabs(time1 - expected_time1) < (ratio * expected_time1) && + fabs(time2 - expected_time2) < (ratio * expected_time2)) { INFO("Succeeded: Expected Vs Actual: Kernel1 - " << expected_time1 << " Vs " << time1 << ", Kernel2 - " << expected_time2 << " Vs " << time2);