fix: Add explicit nullptr checks

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
Filip Hazubski
2024-12-09 20:44:06 +00:00
committed by Compute-Runtime-Automation
parent 2c37db194e
commit 43c199185a
2 changed files with 4 additions and 1 deletions

View File

@@ -340,9 +340,11 @@ cl_int CommandQueueHw<GfxFamily>::enqueueSVMMemcpy(cl_bool blockingCopy,
auto pageFaultManager = context->getMemoryManager()->getPageFaultManager();
if (dstSvmData && pageFaultManager) {
UNRECOVERABLE_IF(dstAllocation == nullptr);
pageFaultManager->moveAllocationToGpuDomain(reinterpret_cast<void *>(dstAllocation->getGpuAddress()));
}
if (srcSvmData && pageFaultManager) {
UNRECOVERABLE_IF(srcAllocation == nullptr);
pageFaultManager->moveAllocationToGpuDomain(reinterpret_cast<void *>(srcAllocation->getGpuAddress()));
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2023 Intel Corporation
* Copyright (C) 2022-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -205,6 +205,7 @@ int OfflineLinker::initHardwareInfo() {
hwInfo = *hwInfoTable[productId];
auto compilerProductHelper = NEO::CompilerProductHelper::create(hwInfo.platform.eProductFamily);
UNRECOVERABLE_IF(compilerProductHelper == nullptr);
hwInfo.ipVersion = compilerProductHelper->getHwIpVersion(hwInfo);
auto releaseHelper = NEO::ReleaseHelper::create(hwInfo.ipVersion);
const auto hwInfoConfig = compilerProductHelper->getHwInfoConfig(hwInfo);