From 92fcc928b6db61904e145eae8d2283a484d2ffde Mon Sep 17 00:00:00 2001 From: Victor Zhang <111778801+victzhan@users.noreply.github.com> Date: Tue, 25 Nov 2025 11:21:03 -0500 Subject: [PATCH] =?UTF-8?q?SWDEV-526773=20-=20Modify=20LaunchDelayKernel?= =?UTF-8?q?=20to=20set=20a=20hard=20coded=20WallClock=E2=80=A6=20(#1911)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * SWDEV-526773 - Modify LaunchDelayKernel to set a hard coded WallClock value when it's not avaliable * Change hardcode clockrate in unit of KHz. --- projects/hip-tests/catch/include/utils.hh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/projects/hip-tests/catch/include/utils.hh b/projects/hip-tests/catch/include/utils.hh index 74c12d0a42..89ad917174 100644 --- a/projects/hip-tests/catch/include/utils.hh +++ b/projects/hip-tests/catch/include/utils.hh @@ -169,6 +169,10 @@ inline void LaunchDelayKernel(const std::chrono::milliseconds interval, const hi int ticks_per_ms = 0; #if HT_AMD HIPCHECK(hipDeviceGetAttribute(&ticks_per_ms, hipDeviceAttributeWallClockRate, 0)); + if (ticks_per_ms == 0) { + std::cout << "clkFrequency = 0, set it to 1000KHz\n"; + ticks_per_ms = 1000; + } #endif #if HT_NVIDIA HIPCHECK(hipDeviceGetAttribute(&ticks_per_ms, hipDeviceAttributeClockRate, 0));