SWDEV-420149 - Fixing unsafe atomics change for targets other than gfx90a.

Change-Id: Ifa26fd1c51505c5e86e121233c8352e3bde846ea


[ROCm/hip-tests commit: a363fa2833]
This commit is contained in:
kjayapra-amd
2023-09-06 05:14:57 -04:00
committed by Karthik Jayaprakash
parent d1028926ef
commit feaa0bbe43
6 changed files with 63 additions and 19 deletions
@@ -89,8 +89,13 @@ TEMPLATE_TEST_CASE("Unit_unsafeAtomicAdd_Coherentwithoutflag", "",
REQUIRE(testResult == true);
}
REQUIRE(A_h[0] == INITIAL_VAL);
REQUIRE(result[0] == 0);
if ((gfxName == "gfx90a" || gfxName.find("gfx90a:")) == 0) {
REQUIRE(A_h[0] == INITIAL_VAL);
REQUIRE(result[0] == 0);
} else {
REQUIRE(A_h[0] == INITIAL_VAL + INC_VAL);
REQUIRE(result[0] == INITIAL_VAL);
}
HIP_CHECK(hipHostFree(A_h));
HIP_CHECK(hipHostFree(result));
}