SWDEV-409113,SWDEV-409114,SWDEV-409112,SWDEV-409111,SWDEV-409110,SWDEV-409109,SWDEV-409096,SWDEV-409105 - Remove strong assumptions on hipMemGetInfo reported memory. (#373)
Change-Id: I6751e20690b93a3db35d98e45d295e5465387c5a
This commit is contained in:
committad av
GitHub
förälder
74c143392b
incheckning
b8fb6f88b9
@@ -42,12 +42,9 @@ static constexpr auto ARRAY_LOOP{100};
|
||||
* bigger chunks of data.
|
||||
* Two scenarios are verified in this API
|
||||
* 1. SmallArray: Allocates NUM_W*NUM_H in a loop and
|
||||
* releases the memory and verifies the meminfo.
|
||||
* releases the memory.
|
||||
* 2. BigArray: Allocates BIGNUM_W*BIGNUM_H in a loop and
|
||||
* releases the memory and verifies the meminfo
|
||||
*
|
||||
* In both cases, the memory info before allocation and
|
||||
* after releasing the memory should be the same.
|
||||
* releases the memory.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -71,9 +68,6 @@ static void ArrayCreate_DiffSizes(int gpu) {
|
||||
for (int i = 0; i < ARRAY_LOOP; i++) {
|
||||
HIP_CHECK_THREAD(hipArrayDestroy(array[i]));
|
||||
}
|
||||
|
||||
HIP_CHECK_THREAD(hipMemGetInfo(&avail, nullptr));
|
||||
REQUIRE_THREAD(pavail == avail);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +88,6 @@ TEST_CASE("Unit_hipArrayCreate_MultiThread") {
|
||||
|
||||
devCnt = HipTest::getDeviceCount();
|
||||
|
||||
const size_t pavail = getFreeMem();
|
||||
for (int i = 0; i < devCnt; i++) {
|
||||
threadlist.push_back(std::thread(ArrayCreate_DiffSizes, i));
|
||||
}
|
||||
@@ -103,12 +96,6 @@ TEST_CASE("Unit_hipArrayCreate_MultiThread") {
|
||||
t.join();
|
||||
}
|
||||
HIP_CHECK_THREAD_FINALIZE();
|
||||
const size_t avail = getFreeMem();
|
||||
|
||||
if (pavail != avail) {
|
||||
WARN("Memory leak of hipMalloc3D API in multithreaded scenario");
|
||||
REQUIRE(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Referens i nytt ärende
Block a user