From 94a7ef6ed1dd569214dc62895e7b958eade83d0a Mon Sep 17 00:00:00 2001 From: Christophe Paquot Date: Mon, 30 Mar 2020 12:37:08 -0700 Subject: [PATCH] Do not retry to allocate when OOM. Shouldn't be needed since we idle on Free. SWDEV-229214 Change-Id: I183006f409388e3c7981f2569649d01d6378be46 --- vdi/hip_memory.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/vdi/hip_memory.cpp b/vdi/hip_memory.cpp index 3fc1a2921a..083b855fa9 100644 --- a/vdi/hip_memory.cpp +++ b/vdi/hip_memory.cpp @@ -64,16 +64,7 @@ hipError_t ihipMalloc(void** ptr, size_t sizeBytes, unsigned int flags) *ptr = amd::SvmBuffer::malloc(*amdContext, flags, sizeBytes, amdContext->devices()[0]->info().memBaseAddrAlign_); if (*ptr == nullptr) { - - for (auto& dev : g_devices) { - hip::getNullStream(*dev->asContext())->finish(); - hip::syncStreams(dev->deviceId()); - } - - *ptr = amd::SvmBuffer::malloc(*amdContext, flags, sizeBytes, amdContext->devices()[0]->info().memBaseAddrAlign_); - if (*ptr == nullptr) { - return hipErrorOutOfMemory; - } + return hipErrorOutOfMemory; } ClPrint(amd::LOG_INFO, amd::LOG_API, "ihipMalloc ptr=0x%zx", *ptr); return hipSuccess;