EXSWHTEC-76 - Implement additional tests for Malloc/Free API (#49)

Change-Id: I9e2fd348e8c1d2bf63f82b90898863006ba90b62


[ROCm/hip-tests commit: 10594ecb3a]
This commit is contained in:
Nives Vukovic
2023-11-21 15:15:21 +00:00
committed by Rakesh Roy
vanhempi 68de68db3b
commit 8e9b175205
4 muutettua tiedostoa jossa 557 lisäystä ja 1 poistoa
@@ -69,7 +69,18 @@ TEST_CASE("Unit_hipMalloc3D_Basic") {
size_t height{SMALL_SIZE}, depth{SMALL_SIZE};
hipPitchedPtr devPitchedPtr;
hipExtent extent = make_hipExtent(width, height, depth);
size_t tot, avail, ptot, pavail;
HIP_CHECK(hipMemGetInfo(&pavail, &ptot));
REQUIRE(hipMalloc3D(&devPitchedPtr, extent) == hipSuccess);
HIPCHECK(hipFree(devPitchedPtr.ptr));
HIP_CHECK(hipMemGetInfo(&avail, &tot));
if (pavail != avail) {
WARN("Memory leak of hipMalloc3D API in multithreaded scenario");
REQUIRE(false);
}
}
/*