diff --git a/catch/unit/virtualMemoryManagement/hipMemAddressReserve.cc b/catch/unit/virtualMemoryManagement/hipMemAddressReserve.cc index 6005668b49..3570c98910 100644 --- a/catch/unit/virtualMemoryManagement/hipMemAddressReserve.cc +++ b/catch/unit/virtualMemoryManagement/hipMemAddressReserve.cc @@ -138,25 +138,15 @@ TEST_CASE("Unit_hipMemAddressReserve_Negative") { } SECTION("pass size as 0") { -#if HT_AMD - REQUIRE(hipMemAddressReserve(&ptrA, 0, 0, 0, 0) == hipErrorMemoryAllocation); -#else REQUIRE(hipMemAddressReserve(&ptrA, 0, 0, 0, 0) == hipErrorInvalidValue); -#endif } -#if HT_NVIDIA SECTION("pass non power of two for alignment") { REQUIRE(hipMemAddressReserve(&ptrA, size_mem, 3, 0, 0) == hipErrorInvalidValue); } -#endif SECTION("pass size as non multiple of host page size") { -#if HT_AMD - REQUIRE(hipMemAddressReserve(&ptrA, (size_mem - 1), 0, 0, 0) == hipErrorMemoryAllocation); -#else REQUIRE(hipMemAddressReserve(&ptrA, (size_mem - 1), 0, 0, 0) == hipErrorInvalidValue); -#endif } CTX_DESTROY(); diff --git a/catch/unit/virtualMemoryManagement/hipMemCreate.cc b/catch/unit/virtualMemoryManagement/hipMemCreate.cc index 42de5181d0..13af1a67b3 100644 --- a/catch/unit/virtualMemoryManagement/hipMemCreate.cc +++ b/catch/unit/virtualMemoryManagement/hipMemCreate.cc @@ -447,22 +447,14 @@ TEST_CASE("Unit_hipMemCreate_Negative") { SECTION("pass location id as -1") { prop.location.id = -1; // set to non existing device -#if HT_AMD - REQUIRE(hipMemCreate(&handle, granularity, &prop, 0) == hipErrorInvalidValue); -#else REQUIRE(hipMemCreate(&handle, granularity, &prop, 0) == hipErrorInvalidDevice); -#endif } SECTION("pass location id as > highest device number") { int numDevices = 0; HIP_CHECK(hipGetDeviceCount(&numDevices)); prop.location.id = numDevices; // set to non existing device -#if HT_AMD - REQUIRE(hipMemCreate(&handle, granularity, &prop, 0) == hipErrorInvalidValue); -#else REQUIRE(hipMemCreate(&handle, granularity, &prop, 0) == hipErrorInvalidDevice); -#endif } CTX_DESTROY(); diff --git a/catch/unit/virtualMemoryManagement/hipMemExportToShareableHandle.cc b/catch/unit/virtualMemoryManagement/hipMemExportToShareableHandle.cc index 3c1dd98833..24fd70963d 100644 --- a/catch/unit/virtualMemoryManagement/hipMemExportToShareableHandle.cc +++ b/catch/unit/virtualMemoryManagement/hipMemExportToShareableHandle.cc @@ -105,13 +105,11 @@ TEST_CASE("Unit_hipMemExportToShareableHandle_Negative_Parameters") { HIP_CHECK(hipMemCreate(&handle, granularity * 2, &prop, 0)); void* shareable_handle = nullptr; -#if HT_NVIDIA SECTION("shareableHandle == nullptr") { HIP_CHECK_ERROR( hipMemExportToShareableHandle(nullptr, handle, hipMemHandleTypePosixFileDescriptor, 0), hipErrorInvalidValue); } -#endif SECTION("handle == nullptr") { HIP_CHECK_ERROR( diff --git a/catch/unit/virtualMemoryManagement/hipMemSetGetAccess.cc b/catch/unit/virtualMemoryManagement/hipMemSetGetAccess.cc index 1fe32c4e87..5d7ca6235a 100644 --- a/catch/unit/virtualMemoryManagement/hipMemSetGetAccess.cc +++ b/catch/unit/virtualMemoryManagement/hipMemSetGetAccess.cc @@ -1269,20 +1269,12 @@ TEST_CASE("Unit_hipMemSetAccess_negative") { } SECTION("pass a size less than reserved size") { -#if HT_AMD - REQUIRE(hipMemSetAccess(ptrA, size_mem - 1, &accessDesc, 1) == hipSuccess); -#else REQUIRE(hipMemSetAccess(ptrA, size_mem - 1, &accessDesc, 1) == hipErrorInvalidValue); -#endif } SECTION("invalid location type") { accessDesc.location.type = hipMemLocationTypeInvalid; -#if HT_AMD - REQUIRE(hipMemSetAccess(ptrA, size_mem, &accessDesc, 1) == hipSuccess); -#else REQUIRE(hipMemSetAccess(ptrA, size_mem, &accessDesc, 1) == hipErrorInvalidValue); -#endif } SECTION("invalid id") { @@ -1299,11 +1291,7 @@ TEST_CASE("Unit_hipMemSetAccess_negative") { SECTION("invalid flag") { accessDesc.flags = static_cast(-1); -#if HT_AMD - REQUIRE(hipMemSetAccess(ptrA, size_mem, &accessDesc, 1) == hipSuccess); -#else REQUIRE(hipMemSetAccess(ptrA, size_mem, &accessDesc, 1) == hipErrorInvalidValue); -#endif } SECTION(" pass zero to count") { diff --git a/catch/unit/virtualMemoryManagement/hipMemUnmap.cc b/catch/unit/virtualMemoryManagement/hipMemUnmap.cc index 7acdc6c4a5..95a7ca9660 100644 --- a/catch/unit/virtualMemoryManagement/hipMemUnmap.cc +++ b/catch/unit/virtualMemoryManagement/hipMemUnmap.cc @@ -79,11 +79,9 @@ TEST_CASE("Unit_hipMemUnmap_negative") { SECTION("pass zero to size") { REQUIRE(hipMemUnmap(ptrA, 0) == hipErrorInvalidValue); } -#if HT_NVIDIA SECTION("unmap a smaller size") { REQUIRE(hipMemUnmap(ptrA, (size_mem - 1)) == hipErrorInvalidValue); } -#endif HIP_CHECK(hipMemRelease(handle)); HIP_CHECK(hipMemUnmap(ptrA, size_mem));