From 4ec606f1ee65d5dc34ca00e213bab0905e2282ca Mon Sep 17 00:00:00 2001 From: "Xie, Jiabao(Jimbo)" Date: Thu, 3 Apr 2025 11:35:38 -0400 Subject: [PATCH] SWDEV-501675 - disable Unit_hipMalloc_AllocateMoreThanTotalRAM (#63) Unit_hipMalloc_AllocateMoreThanTotalRAM is an invalid test. hipMalloc is able to allocate more than RAM size if VRam is larger, unless the test is meant to only allocate on host device. Previously this test may have passed because of an incorrect check on hipMalloc limit: we had incorrectly limited allocation to physical ram size. This is no longer correct. We could always allocate Vram limit or sometimes system ram limit if Vram is full, fixed in https://github.com/AMD-ROCm-Internal/clr/pull/122 Co-authored-by: Jimbo Xie [ROCm/hip-tests commit: e25680e4d16cfa4b9e576d81f4a7af87a5a4398d] --- projects/hip-tests/catch/unit/memory/hipMalloc.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/projects/hip-tests/catch/unit/memory/hipMalloc.cc b/projects/hip-tests/catch/unit/memory/hipMalloc.cc index 5420eaec65..cd6e91b5ce 100644 --- a/projects/hip-tests/catch/unit/memory/hipMalloc.cc +++ b/projects/hip-tests/catch/unit/memory/hipMalloc.cc @@ -74,6 +74,9 @@ TEST_CASE("Unit_hipMalloc_Negative_Parameters") { } } +// Commenting this due to defect SWDEV-501675, used in below commented tests +#if 0 +/** /** * Local Function to Get total RAM size in bytes */ @@ -90,8 +93,6 @@ static inline size_t getTotalRAM() { #endif } -// Commenting this due to defect SWDEV-501675, used in below commented tests -#if 0 /** * Local Function to Get Available RAM size in bytes */ @@ -314,7 +315,6 @@ TEST_CASE("Unit_hipMalloc_AllocateAvailableVRAMAndPossibleRAM") { HIP_CHECK(hipFree(devMem)); #endif } -#endif /** * Test Description @@ -343,8 +343,6 @@ TEST_CASE("Unit_hipMalloc_AllocateMoreThanTotalRAM") { HIP_CHECK_ERROR(hipMalloc(&devMem, size), hipErrorOutOfMemory); } -// Commenting this due to defect SWDEV-501675 -#if 0 /** * Test Description * ------------------------