diff --git a/tests/catch/multiproc/hipHostMallocTestsMproc.cc b/tests/catch/multiproc/hipHostMallocTestsMproc.cc index cca3c396aa..2e9a186187 100644 --- a/tests/catch/multiproc/hipHostMallocTestsMproc.cc +++ b/tests/catch/multiproc/hipHostMallocTestsMproc.cc @@ -41,7 +41,7 @@ Testcase Scenarios : * Defines */ #define LIB_ROCMSMI "librocm_smi64.so" -#define ALLOC_SIZE (1*1024*1024) +#define ALLOC_SIZE (30*1024*1024) /** * Global variables @@ -221,7 +221,11 @@ static bool validatePageTableAllocations(const char *devList, int visDevCnt) { } for (indx = 0; indx < numdev; indx++) { - if (current[indx] - prev[indx]) + // For visible hip devices, there should be increase in VRAM usage + // due to page table allocations + // For NON visible hip devices, there can be reduction in VRAM usage + // due to removal of page tables from them + if (current[indx] > prev[indx]) changeCnt++; } diff --git a/tests/src/runtimeApi/memory/hipHostMallocTests.cpp b/tests/src/runtimeApi/memory/hipHostMallocTests.cpp index 7243813ef3..013b533529 100644 --- a/tests/src/runtimeApi/memory/hipHostMallocTests.cpp +++ b/tests/src/runtimeApi/memory/hipHostMallocTests.cpp @@ -61,7 +61,7 @@ Testcase Scenarios : */ #define LIB_ROCMSMI "librocm_smi64.so" #define NUM_BYTES 1000 -#define ALLOC_SIZE (1*1024*1024) +#define ALLOC_SIZE (30*1024*1024) /** @@ -246,7 +246,11 @@ bool validatePageTableAllocations(const char *devList, int devCnt) { } for (indx = 0; indx < numdev; indx++) { - if (current[indx] - prev[indx]) + // For visible hip devices, there should be increase in VRAM usage + // due to page table allocations + // For NON visible hip devices, there can be reduction in VRAM usage + // due to removal of page tables from them + if (current[indx] > prev[indx]) changeCnt++; }