SWDEV-371332 - [ABI Break]remove if def for cu/cuda memtype

Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: I0754ef8bc7c9384bab65599a41719de0fd71b415
This commit is contained in:
sdashmiz
2023-10-06 19:08:16 -04:00
committed by Rakesh Roy
parent baaaff9d7f
commit bfa6d77ce5
3 changed files with 8 additions and 28 deletions
+6 -16
View File
@@ -72,11 +72,9 @@ TEST_CASE("Unit_hipPointerGetAttribute_MemoryTypes") {
HIP_CHECK(hipPointerGetAttribute(&datatype,
HIP_POINTER_ATTRIBUTE_MEMORY_TYPE,
reinterpret_cast<hipDeviceptr_t>(A_d)));
#if HT_NVIDIA
REQUIRE(datatype == CU_MEMORYTYPE_DEVICE);
#else
REQUIRE(datatype == hipMemoryTypeDevice);
#endif
}
#if HT_AMD
SECTION("Malloc Array Allocation") {
@@ -86,11 +84,8 @@ TEST_CASE("Unit_hipPointerGetAttribute_MemoryTypes") {
HIP_CHECK(hipPointerGetAttribute(&datatype,
HIP_POINTER_ATTRIBUTE_MEMORY_TYPE,
reinterpret_cast<hipDeviceptr_t>(B_d)));
#if HT_NVIDIA
REQUIRE(datatype == CU_MEMORYTYPE_ARRAY);
#else
REQUIRE(datatype == hipMemoryTypeArray);
#endif
HIP_CHECK(hipFreeArray(B_d));
}
@@ -105,11 +100,8 @@ TEST_CASE("Unit_hipPointerGetAttribute_MemoryTypes") {
HIP_CHECK(hipPointerGetAttribute(&datatype,
HIP_POINTER_ATTRIBUTE_MEMORY_TYPE,
reinterpret_cast<hipDeviceptr_t>(arr)));
#if HT_NVIDIA
REQUIRE(datatype == CU_MEMORYTYPE_ARRAY);
#else
REQUIRE(datatype == hipMemoryTypeArray);
#endif
HIP_CHECK(hipFreeArray(arr));
}
#endif
@@ -171,11 +163,9 @@ TEST_CASE("Unit_hipPointerGetAttribute_PeerGPU") {
HIP_CHECK(hipPointerGetAttribute(&data,
HIP_POINTER_ATTRIBUTE_MEMORY_TYPE,
reinterpret_cast<hipDeviceptr_t>(A_d)));
#if HT_NVIDIA
REQUIRE(data == CU_MEMORYTYPE_DEVICE);
#else
REQUIRE(data == hipMemoryTypeDevice);
#endif
HIP_CHECK(hipPointerGetAttribute(&data,
HIP_POINTER_ATTRIBUTE_DEVICE_ORDINAL,
reinterpret_cast<hipDeviceptr_t>(A_d)));