SWDEV-532473 - Add Pcie atomic support check to failing tests (#575)
Co-authored-by: Rahul Manocha <rmanocha@amd.com>
This commit is contained in:
committed by
GitHub
parent
5f517d37ee
commit
be2e7314fa
@@ -53,6 +53,7 @@ TEST_CASE("Unit_kernel_ChkPrintf") {
|
||||
const char* check = st.c_str();
|
||||
for (int i = 0; i < device_count; ++i) {
|
||||
HIP_CHECK(hipSetDevice(i));
|
||||
if (!HipTest::isPcieAtomicSupported()) continue;
|
||||
hipLaunchKernelGGL(run_printf, dim3(1), dim3(1), 0, 0);
|
||||
HIP_CHECK(hipDeviceSynchronize());
|
||||
char* data = new char[st.size()];
|
||||
|
||||
@@ -106,13 +106,7 @@ static void TstCoherency(int* ptr, MemoryType type) {
|
||||
behavior is observed or not with memory allocated using hipHostMalloc()*/
|
||||
TEST_CASE("Unit_hipHostMalloc_CoherentTst") {
|
||||
HIP_CHECK(hipSetDevice(0));
|
||||
int pcieAtomic = 0;
|
||||
HIP_CHECK(hipDeviceGetAttribute(&pcieAtomic, hipDeviceAttributeHostNativeAtomicSupported, 0));
|
||||
if (!pcieAtomic) {
|
||||
fprintf(stderr, "Device doesn't support pcie atomic, Skipped\n");
|
||||
REQUIRE(true);
|
||||
return;
|
||||
}
|
||||
CHECK_PCIE_ATOMIC_SUPPORT;
|
||||
|
||||
int *Ptr = nullptr, SIZE = sizeof(int);
|
||||
YES_COHERENT = false;
|
||||
@@ -138,6 +132,8 @@ TEST_CASE("Unit_hipHostMalloc_CoherentTst") {
|
||||
#if HT_AMD
|
||||
TEST_CASE("Unit_hipMallocManaged_CoherentTst") {
|
||||
HIP_CHECK(hipSetDevice(0));
|
||||
CHECK_PCIE_ATOMIC_SUPPORT;
|
||||
|
||||
int *Ptr = nullptr, SIZE = sizeof(int), managed = 0;
|
||||
YES_COHERENT = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user