Return sucess for zeCommandListAppendMemAdvise when not supported

zeCommandListAppendMemAdvise is a performance hint, so on error,
we can just return success, while at the same time ignoring it.

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
This commit is contained in:
Jaime Arteaga
2021-10-27 23:26:26 +00:00
committed by Compute-Runtime-Automation
parent f20cdac7d3
commit 7363b3fc09
2 changed files with 3 additions and 5 deletions

View File

@@ -792,9 +792,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendMemAdvise(ze_device_hand
}
auto alloc = allocData->gpuAllocations.getGraphicsAllocation(deviceImp->getRootDeviceIndex());
if (!memoryManager->setMemAdvise(alloc, flags, deviceImp->getRootDeviceIndex())) {
return ZE_RESULT_ERROR_UNKNOWN;
}
memoryManager->setMemAdvise(alloc, flags, deviceImp->getRootDeviceIndex());
deviceImp->memAdviseSharedAllocations[allocData] = flags;
return ZE_RESULT_SUCCESS;