SWDEV-445576 - Return error when hipMemPoolDestroy is invoked on the default mempool
Change-Id: I7a7ab499f781cf7e92cad1ae39a40b4f37f62653
[ROCm/clr commit: 4d61237a6f]
Этот коммит содержится в:
@@ -252,9 +252,12 @@ hipError_t hipMemPoolDestroy(hipMemPool_t mem_pool) {
|
||||
HIP_RETURN(hipErrorInvalidValue);
|
||||
}
|
||||
hip::MemoryPool* hip_mem_pool = reinterpret_cast<hip::MemoryPool*>(mem_pool);
|
||||
hip_mem_pool->ReleaseFreedMemory();
|
||||
|
||||
auto device = hip_mem_pool->Device();
|
||||
if (hip_mem_pool == device->GetDefaultMemoryPool()) {
|
||||
HIP_RETURN(hipErrorInvalidValue);
|
||||
}
|
||||
hip_mem_pool->ReleaseFreedMemory();
|
||||
|
||||
// Force default pool if the current one is destroyed
|
||||
if (hip_mem_pool == device->GetCurrentMemoryPool()) {
|
||||
|
||||
Ссылка в новой задаче
Block a user