SWDEV-391727 - Unit_hipMemRangeGetAttribute_TstCountParam
Recreation of github PR https://github.com/ROCm-Developer-Tools/hip-tests/pull/399
Change-Id: I80c11d549b4f6e66ecea2b676d32fba9d7929e49
[ROCm/hip-tests commit: ab80259b3c]
This commit is contained in:
committed by
Rakesh Roy
parent
bae9739c15
commit
bcd84a5201
@@ -91,6 +91,19 @@ static int HmmAttrPrint() {
|
||||
TEST_CASE("Unit_hipMemRangeGetAttribute_TstCountParam") {
|
||||
int MangdMem = HmmAttrPrint();
|
||||
if (MangdMem == 1) {
|
||||
|
||||
#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 hipMallocManaged "
|
||||
"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
|
||||
|
||||
int MEM_SIZE = 4096, RND_NUM = 9999, FLG_READMOSTLY_ENBLD = 1;
|
||||
bool IfTestPassed = true;
|
||||
int data = RND_NUM, *devPtr = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user