SWDEV-485866 - Return OOM if stream creation fails due to insufficient memory.

Change-Id: I4e57ecc81921bde274bb6a4e0890f0fc6a17955a
Tá an tiomantas seo le fáil i:
Jaydeep Patel údaraithe agus Jaydeepkumar Patel tiomanta 2024-10-10 00:44:54 -04:00
1 tuismitheoir b977101893
tiomantas 5ccc140e1b
4 comhad athraithe
+11 -3

Níor tháinig aon chomhaid le do chuardach

+5 -3
Féach ar an gComhad
@@ -1461,9 +1461,11 @@ bool VirtualGPU::initPool(size_t kernarg_pool_size) {
roc_device_.info().largeBar_) {
kernarg_pool_base_ =
reinterpret_cast<address>(roc_device_.deviceLocalAlloc(kernarg_pool_size_));
// @note Workaround first access penalty.
// KFD may update CPU page tables on the first CPU access
*kernarg_pool_base_ = 0;
if (kernarg_pool_base_ != nullptr) {
// @note Workaround first access penalty.
// KFD may update CPU page tables on the first CPU access
*kernarg_pool_base_ = 0;
}
} else {
kernarg_pool_base_ = reinterpret_cast<address>(roc_device_.hostAlloc(kernarg_pool_size_, 0,
Device::MemorySegment::kKernArg));