SWDEV-548482 - Address memory leaks in memory tests (#526)
* SWDEV-548482 - Address memory leaks in memory tests * SWDEV-548482 - Added destroy calls * SWDEV-548482 - Address one more memory leak * SWDEV-548482 - Minor tweaks * SWDEV-548482 - Run clang-format * SWDEV-548482 - Add new lines * SWDEV-548482 - Run clang-format * SWDEV-548482 - Minor fix --------- Co-authored-by: Marko Arandjelovic <Marko.Arandjelovic@amd.com>
Αυτή η υποβολή περιλαμβάνεται σε:
υποβλήθηκε από
GitHub
γονέας
f3a2bb07a4
υποβολή
05a9a528f7
@@ -1121,6 +1121,7 @@ TEST_CASE("Unit_hipGetProcAddress_MemoryApisSetAndGetAttributes") {
|
||||
REQUIRE(allAttributesDataWithPtr.hostPointer == allAttributesData.hostPointer);
|
||||
REQUIRE(allAttributesDataWithPtr.isManaged == allAttributesData.isManaged);
|
||||
REQUIRE(allAttributesDataWithPtr.allocationFlags == allAttributesData.allocationFlags);
|
||||
HIP_CHECK(hipFree(devPtr2));
|
||||
}
|
||||
|
||||
// Validating hipDrvPointerGetAttributes API
|
||||
@@ -1155,6 +1156,8 @@ TEST_CASE("Unit_hipGetProcAddress_MemoryApisSetAndGetAttributes") {
|
||||
REQUIRE(devicePointerWithPtr == devicePointer);
|
||||
REQUIRE(rangeSizeWithPtr == rangeSize);
|
||||
REQUIRE(startAddressWithPtr == startAddress);
|
||||
|
||||
HIP_CHECK(hipFree(devPtr3));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5778,8 +5781,10 @@ TEST_CASE("Unit_hipGetProcAddress_MemoryApisStreamOrderedMemory") {
|
||||
size_t size = -1;
|
||||
HIP_CHECK(hipMemPtrGetInfo(dPtr, &size));
|
||||
REQUIRE(size == 1024);
|
||||
REQUIRE(dyn_hipMallocFromPoolAsync_ptr(&dPtr, 1, mem_pool, stream) == hipErrorOutOfMemory);
|
||||
void* dPtr2 = nullptr;
|
||||
REQUIRE(dyn_hipMallocFromPoolAsync_ptr(&dPtr2, 1, mem_pool, stream) == hipErrorOutOfMemory);
|
||||
|
||||
HIP_CHECK(dyn_hipFreeAsync_ptr(dPtr, stream));
|
||||
HIP_CHECK(hipMemPoolDestroy(mem_pool));
|
||||
HIP_CHECK(hipStreamDestroy(stream));
|
||||
}
|
||||
|
||||
Αναφορά σε νέο ζήτημα
Block a user