Skip to content

Commit e25680e

Browse files
authored
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 <jiabaxie@amd.com>
1 parent d6f98eb commit e25680e

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

catch/unit/memory/hipMalloc.cc

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ TEST_CASE("Unit_hipMalloc_Negative_Parameters") {
7474
}
7575
}
7676

77+
// Commenting this due to defect SWDEV-501675, used in below commented tests
78+
#if 0
79+
/**
7780
/**
7881
* Local Function to Get total RAM size in bytes
7982
*/
@@ -90,8 +93,6 @@ static inline size_t getTotalRAM() {
9093
#endif
9194
}
9295

93-
// Commenting this due to defect SWDEV-501675, used in below commented tests
94-
#if 0
9596
/**
9697
* Local Function to Get Available RAM size in bytes
9798
*/
@@ -314,7 +315,6 @@ TEST_CASE("Unit_hipMalloc_AllocateAvailableVRAMAndPossibleRAM") {
314315
HIP_CHECK(hipFree(devMem));
315316
#endif
316317
}
317-
#endif
318318

319319
/**
320320
* Test Description
@@ -343,8 +343,6 @@ TEST_CASE("Unit_hipMalloc_AllocateMoreThanTotalRAM") {
343343
HIP_CHECK_ERROR(hipMalloc(&devMem, size), hipErrorOutOfMemory);
344344
}
345345

346-
// Commenting this due to defect SWDEV-501675
347-
#if 0
348346
/**
349347
* Test Description
350348
* ------------------------

0 commit comments

Comments
 (0)