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:
+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;
|
||||
|
||||
مرجع در شماره جدید
Block a user