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

Change-Id: I4e57ecc81921bde274bb6a4e0890f0fc6a17955a
This commit is contained in:
Jaydeep Patel authored and Jaydeepkumar Patel committed 2024-10-10 00:44:54 -04:00
1 parent b977101893
commit 5ccc140e1b
4 files changed
+11 -3

No files matched your search

+5 -3
View File
@@ -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));