From 27939adba84fb91bd516fc0566d837ff5c568bf0 Mon Sep 17 00:00:00 2001 From: ROCm CI Service Account <66695075+rocm-ci@users.noreply.github.com> Date: Tue, 26 Jul 2022 11:46:32 +0530 Subject: [PATCH] SWDEV-344211 - Fix hipHostMalloc tests (#2823) - Increase allocation size to 30MB to make sure new page table allocations happen - Change validation criteria to check for increase in VRAM usage for visible HIP devices Change-Id: Ie5bf1a89ceda0ff50140f426235047adcca0fdea [ROCm/hip-tests commit: 2c52240b0ec5f9515d7e21472d7f1d24e389df53] --- .../hip-tests/catch/multiproc/hipHostMallocTestsMproc.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/projects/hip-tests/catch/multiproc/hipHostMallocTestsMproc.cc b/projects/hip-tests/catch/multiproc/hipHostMallocTestsMproc.cc index cca3c396aa..2e9a186187 100644 --- a/projects/hip-tests/catch/multiproc/hipHostMallocTestsMproc.cc +++ b/projects/hip-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++; }