mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Call VM prefetch for KMD-migrated shared allocation on all VMs
Call VM prefetch ioctl on all VMs for the KMD to apply a synchronoues bind operation of buffer objects on all VMs. Related-To: NEO-7841 Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
e1af516c25
commit
b839f26ed7
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@ -346,9 +346,13 @@ bool DrmAllocation::setMemPrefetch(Drm *drm, SubDeviceIdsVec &subDeviceIds) {
|
||||
for (uint8_t handleId = 0u; handleId < EngineLimits::maxHandleCount; handleId++) {
|
||||
if (storageInfo.memoryBanks.test(handleId)) {
|
||||
auto bo = this->getBOs()[handleId];
|
||||
auto vmHandleId = subDeviceIds[handleId % subDeviceIds.size()];
|
||||
auto subDeviceId = DebugManager.flags.CreateContextWithAccessCounters.get() > 0 ? vmHandleId : handleId;
|
||||
success &= prefetchBO(bo, vmHandleId, subDeviceId);
|
||||
auto subDeviceId = handleId;
|
||||
if (DebugManager.flags.CreateContextWithAccessCounters.get() > 0) {
|
||||
subDeviceId = subDeviceIds[handleId % subDeviceIds.size()];
|
||||
}
|
||||
for (auto vmHandleId : subDeviceIds) {
|
||||
success &= prefetchBO(bo, vmHandleId, subDeviceId);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user