SWDEV-514141 - Fix zero clock rate issues (#4)

1.Remove clock functions from some tests that don't need them.
2.In some memory pool tests and coherency tests, timer-based kernel
delay isn't reliable, use pinned host based notification instead.
3.Add CHECK_PCIE_ATOMICS_SUPPORT before some tests.
4.catch/unit/memory/hipMemoryAllocateCoherent.cc is removed
as it is useless and originally excluded in building.
5.Some tests can still pass even if clock rate =0, thus they
  will be kept as is.
6.Some logic and format improvement in some tests.

Change-Id: I6b3c6bf54c61cffd45cd6f17c75998f751b75725

[ROCm/hip-tests commit: ec8ff45a1d]
This commit is contained in:
Sang, Tao
2025-06-11 11:41:25 -04:00
کامیت شده توسط GitHub
والد 178d6036f5
کامیت 438882ceb7
15فایلهای تغییر یافته به همراه332 افزوده شده و 581 حذف شده
@@ -314,6 +314,15 @@ inline bool isImageSupported() {
return imageSupport != 0;
}
inline bool isPcieAtomicsSupported() {
int pcieAtomics = 1;
int device;
HIP_CHECK(hipGetDevice(&device));
HIPCHECK(hipDeviceGetAttribute(&pcieAtomics, hipDeviceAttributeHostNativeAtomicSupported,
device));
return pcieAtomics != 0;
}
inline bool areWarpMatchFunctionsSupported() {
int matchFunctionsSupported = 1;
#if HT_NVIDIA
@@ -500,6 +509,13 @@ class BlockingContext {
return; \
}
// This must be called in host-device memory conherency tests
#define CHECK_PCIE_ATOMICS_SUPPORT \
if (!HipTest::isPcieAtomicsSupported()) { \
INFO("Pcie atomics is not support on the device. Skipped."); \
return; \
}
// This must be called in the beginning of warp test app's main() to indicate warp match functions
// are supported.
#define CHECK_WARP_MATCH_FUNCTIONS_SUPPORT \