SWDEV-391998 - Fix and re-enable Unit_hipMallocManaged_OverSubscription
Change-Id: I896ad5a4894e7a63ad15308838e15601f2e3540c
[ROCm/hip-tests commit: 9290cc3c31]
Этот коммит содержится в:
коммит произвёл
Rakesh Roy
родитель
1f343c299d
Коммит
2df79888e1
@@ -30,7 +30,6 @@
|
||||
"DisabledTests": [
|
||||
#if defined COMMON
|
||||
"Unit_hipStreamPerThread_DeviceReset_1",
|
||||
"Unit_hipMallocManaged_OverSubscription",
|
||||
"Unit_hipDeviceGetSharedMemConfig_Positive_Basic",
|
||||
"Unit_hipDeviceGetSharedMemConfig_Positive_Threaded",
|
||||
"Unit_hipDeviceGetCacheConfig_Positive_Basic",
|
||||
@@ -172,7 +171,6 @@
|
||||
#endif
|
||||
#if defined MI2XX
|
||||
"Unit_hipStreamPerThread_DeviceReset_1",
|
||||
"Unit_hipMallocManaged_OverSubscription",
|
||||
"Unit_hipDeviceGetPCIBusId_Negative_PartialFill",
|
||||
"Unit_hipInit_Negative",
|
||||
"Unit_hipMemGetAddressRange_Negative",
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
"Unit_hipMalloc3D_ValidatePitch",
|
||||
"Unit_hipMemAllocPitch_ValidatePitch",
|
||||
"Unit_hipGraphExecMemcpyNodeSetParamsToSymbol_Functional",
|
||||
"Unit_hipMallocManaged_OverSubscription",
|
||||
"Unit_hipMallocManaged_CoherentTstWthAdvise",
|
||||
"Unit_hipMallocManaged_Advanced",
|
||||
"Unit_hipMemRangeGetAttribute_TstCountParam",
|
||||
|
||||
@@ -217,7 +217,6 @@ TEST_CASE("Unit_hipMallocManaged_MultiChunkMultiDevice") {
|
||||
}
|
||||
|
||||
// The following tests oversubscription hipMallocManaged() api
|
||||
// Currently disabled.
|
||||
TEST_CASE("Unit_hipMallocManaged_OverSubscription") {
|
||||
auto managed = HmmAttrPrint();
|
||||
if (managed != 1) {
|
||||
@@ -225,15 +224,22 @@ TEST_CASE("Unit_hipMallocManaged_OverSubscription") {
|
||||
return;
|
||||
}
|
||||
|
||||
#if HT_AMD
|
||||
int isPageableHMM = 0;
|
||||
HIP_CHECK(hipDeviceGetAttribute(&isPageableHMM,
|
||||
hipDeviceAttributePageableMemoryAccess, 0));
|
||||
if (!isPageableHMM) {
|
||||
SUCCEED("Running on a system where all the memory requested in hipMallocManged "
|
||||
"is allocated on the host.\nThis can cause instability because of out of memory failures.\n"
|
||||
"Hence skipping the test with Pass result.\n");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
void* A = nullptr;
|
||||
size_t total = 0, free = 0;
|
||||
HIP_CHECK(hipMemGetInfo(&free, &total));
|
||||
// ToDo: In case of HMM, memory over-subscription is allowed. Hence, relook
|
||||
// into how out of memory can be tested.
|
||||
// Demanding more mem size than available
|
||||
#if HT_AMD
|
||||
HIP_CHECK_ERROR(hipMallocManaged(&A, (free + 1), hipMemAttachGlobal), hipErrorOutOfMemory);
|
||||
#endif
|
||||
HIP_CHECK(hipMallocManaged(&A, (free + 1), hipMemAttachGlobal));
|
||||
}
|
||||
|
||||
// The following test does negative testing of hipMallocManaged() api
|
||||
|
||||
Ссылка в новой задаче
Block a user