mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-01 04:23:00 +08:00
Optimize Level Zero indirect allocations handling.
Remove find in cmdlist makeResidentAndMigrate, not needed, CSR resolves duplicates at makeResident calls Co-authored-by: Michal Mrozek <michal.mrozek@intel.com> Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
3d9548cee9
commit
3a030d9b8b
@@ -138,16 +138,13 @@ NEO::PreemptionMode CommandList::obtainFunctionPreemptionMode(Kernel *kernel) {
|
||||
|
||||
void CommandList::makeResidentAndMigrate(bool performMigration) {
|
||||
for (auto alloc : commandContainer.getResidencyContainer()) {
|
||||
if (csr->getResidencyAllocations().end() ==
|
||||
std::find(csr->getResidencyAllocations().begin(), csr->getResidencyAllocations().end(), alloc)) {
|
||||
csr->makeResident(*alloc);
|
||||
csr->makeResident(*alloc);
|
||||
|
||||
if (performMigration &&
|
||||
(alloc->getAllocationType() == NEO::GraphicsAllocation::AllocationType::SVM_GPU ||
|
||||
alloc->getAllocationType() == NEO::GraphicsAllocation::AllocationType::SVM_CPU)) {
|
||||
auto pageFaultManager = device->getDriverHandle()->getMemoryManager()->getPageFaultManager();
|
||||
pageFaultManager->moveAllocationToGpuDomain(reinterpret_cast<void *>(alloc->getGpuAddress()));
|
||||
}
|
||||
if (performMigration &&
|
||||
(alloc->getAllocationType() == NEO::GraphicsAllocation::AllocationType::SVM_GPU ||
|
||||
alloc->getAllocationType() == NEO::GraphicsAllocation::AllocationType::SVM_CPU)) {
|
||||
auto pageFaultManager = device->getDriverHandle()->getMemoryManager()->getPageFaultManager();
|
||||
pageFaultManager->moveAllocationToGpuDomain(reinterpret_cast<void *>(alloc->getGpuAddress()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user