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
This commit is contained in:
1 parent
c4284d50c5
commit
ec8ff45a1d
15 file changed
+332
-581
No files matched your search
@@ -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 \
|
||||
|
||||
Reference in new issue
Block a user