SWDEV-371332 - [ABI Break]remove if def for cu/cuda memtype
Signed-off-by: sdashmiz <shadi.dashmiz@amd.com> Change-Id: I0754ef8bc7c9384bab65599a41719de0fd71b415
Этот коммит содержится в:
коммит произвёл
Rakesh Roy
родитель
baaaff9d7f
Коммит
bfa6d77ce5
@@ -135,11 +135,9 @@ TEST_CASE("Unit_hipDrvPtrGetAttributes_Functional") {
|
||||
reinterpret_cast<hipDeviceptr_t>(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);
|
||||
|
||||
@@ -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)));
|
||||
|
||||
@@ -96,19 +96,11 @@ TEST_CASE("Unit_hipPtrGetAttribute_Simple") {
|
||||
unsigned int datatype;
|
||||
HIP_CHECK(hipPointerGetAttribute(&datatype, HIP_POINTER_ATTRIBUTE_MEMORY_TYPE,
|
||||
reinterpret_cast<hipDeviceptr_t>(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<hipDeviceptr_t>(A_Pinned_h)));
|
||||
#ifdef __HIP_PLATFORM_NVCC__
|
||||
REQUIRE(datatype == CU_MEMORYTYPE_HOST);
|
||||
#else
|
||||
REQUIRE(datatype == hipMemoryTypeHost);
|
||||
#endif
|
||||
|
||||
// HIP_POINTER_ATTRIBUTE_IS_MANAGED
|
||||
bool isHmm;
|
||||
|
||||
Ссылка в новой задаче
Block a user