Do not retry to allocate when OOM. Shouldn't be needed since we idle on Free.

SWDEV-229214

Change-Id: I183006f409388e3c7981f2569649d01d6378be46
This commit is contained in:
Christophe Paquot
2020-03-30 12:37:08 -07:00
والد b081912962
کامیت 94a7ef6ed1
+1 -10
مشاهده پرونده
@@ -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;