mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-30 01:35:20 +08:00
perf multi device ocl: reduce number of waitOnCpu calls when migrating memory
don't wait on cpu when migrate within same root device Related-To: NEO-7552 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
dbd9b19b35
commit
ea15b78a53
@@ -22,10 +22,10 @@ void MigrationController::handleMigration(Context &context, CommandStreamReceive
|
||||
auto memoryManager = targetCsr.getMemoryManager();
|
||||
auto targetRootDeviceIndex = targetCsr.getRootDeviceIndex();
|
||||
auto migrationSyncData = memObj->getMultiGraphicsAllocation().getMigrationSyncData();
|
||||
if (!migrationSyncData->isUsedByTheSameContext(targetCsr.getTagAddress())) {
|
||||
migrationSyncData->waitOnCpu();
|
||||
}
|
||||
if (migrationSyncData->getCurrentLocation() != targetRootDeviceIndex) {
|
||||
if (!migrationSyncData->isUsedByTheSameContext(targetCsr.getTagAddress())) {
|
||||
migrationSyncData->waitOnCpu();
|
||||
}
|
||||
migrateMemory(context, *memoryManager, memObj, targetRootDeviceIndex);
|
||||
}
|
||||
migrationSyncData->signalUsage(targetCsr.getTagAddress(), targetCsr.peekTaskCount() + 1);
|
||||
|
||||
Reference in New Issue
Block a user