diff --git a/catch/unit/memory/hipDrvPtrGetAttributes.cc b/catch/unit/memory/hipDrvPtrGetAttributes.cc index e679d70d54..8aeb9b37b3 100644 --- a/catch/unit/memory/hipDrvPtrGetAttributes.cc +++ b/catch/unit/memory/hipDrvPtrGetAttributes.cc @@ -135,11 +135,9 @@ TEST_CASE("Unit_hipDrvPtrGetAttributes_Functional") { reinterpret_cast(A_d + 100))); REQUIRE(dev_ptr == dev_ptr1); -#if HT_NVIDIA - REQUIRE(memory_type == CU_MEMORYTYPE_DEVICE); -#else + REQUIRE(memory_type == hipMemoryTypeDevice); -#endif + REQUIRE(device_ordinal == deviceId); REQUIRE(range_size == Nbytes); REQUIRE(start_addr == dev); diff --git a/catch/unit/memory/hipPointerGetAttribute.cc b/catch/unit/memory/hipPointerGetAttribute.cc index 79bce060e5..16101a6283 100644 --- a/catch/unit/memory/hipPointerGetAttribute.cc +++ b/catch/unit/memory/hipPointerGetAttribute.cc @@ -72,11 +72,9 @@ TEST_CASE("Unit_hipPointerGetAttribute_MemoryTypes") { HIP_CHECK(hipPointerGetAttribute(&datatype, HIP_POINTER_ATTRIBUTE_MEMORY_TYPE, reinterpret_cast(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(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(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(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(A_d))); diff --git a/catch/unit/memory/hipPtrGetAttribute.cc b/catch/unit/memory/hipPtrGetAttribute.cc index c87ea5a5f7..69a97fc9da 100644 --- a/catch/unit/memory/hipPtrGetAttribute.cc +++ b/catch/unit/memory/hipPtrGetAttribute.cc @@ -96,19 +96,11 @@ TEST_CASE("Unit_hipPtrGetAttribute_Simple") { unsigned int datatype; HIP_CHECK(hipPointerGetAttribute(&datatype, HIP_POINTER_ATTRIBUTE_MEMORY_TYPE, reinterpret_cast(A_d))); -#ifdef __HIP_PLATFORM_NVCC__ - REQUIRE(datatype == CU_MEMORYTYPE_DEVICE); -#else REQUIRE(datatype == hipMemoryTypeDevice); -#endif HIP_CHECK(hipPointerGetAttribute(&datatype, HIP_POINTER_ATTRIBUTE_MEMORY_TYPE, reinterpret_cast(A_Pinned_h))); -#ifdef __HIP_PLATFORM_NVCC__ - REQUIRE(datatype == CU_MEMORYTYPE_HOST); -#else REQUIRE(datatype == hipMemoryTypeHost); -#endif // HIP_POINTER_ATTRIBUTE_IS_MANAGED bool isHmm;