mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-07 12:42:54 +08:00
Allocate buffers in local memory for PVC multi root device platforms (1/n)
PVC platform with no support for atomic operations on system memory must always allocate buffers in local memory to avoid atomic access violation. Note: the feature is being implemented under the new registry key AllocateBuffersInLocalMemoryForMultiRootDeviceContexts (disabled by default) Related-To: NEO-7092 Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
b0c97e49ea
commit
25a5ed0dca
@@ -981,6 +981,9 @@ bool CommandQueue::queueDependenciesClearRequired() const {
|
||||
|
||||
bool CommandQueue::blitEnqueueAllowed(const CsrSelectionArgs &args) const {
|
||||
bool blitEnqueueAllowed = getGpgpuCommandStreamReceiver().peekTimestampPacketWriteEnabled() || this->isCopyOnly;
|
||||
if (this->getContext().getRootDeviceIndices().size() > 1) {
|
||||
blitEnqueueAllowed &= !DebugManager.flags.AllocateBuffersInLocalMemoryForMultiRootDeviceContexts.get();
|
||||
}
|
||||
if (DebugManager.flags.EnableBlitterForEnqueueOperations.get() != -1) {
|
||||
blitEnqueueAllowed = DebugManager.flags.EnableBlitterForEnqueueOperations.get();
|
||||
}
|
||||
|
||||
@@ -440,6 +440,8 @@ Buffer *Buffer::create(Context *context,
|
||||
}
|
||||
}
|
||||
|
||||
multiGraphicsAllocation.setMultiStorage(MemoryPropertiesHelper::useMultiStorageForCrossRootDeviceAccess(context->getRootDeviceIndices().size() > 1));
|
||||
|
||||
auto rootDeviceIndex = context->getDevice(0u)->getRootDeviceIndex();
|
||||
auto &allocationInfo = allocationInfos[rootDeviceIndex];
|
||||
auto memoryStorage = multiGraphicsAllocation.getDefaultGraphicsAllocation()->getUnderlyingBuffer();
|
||||
|
||||
@@ -27,12 +27,17 @@ void MigrationController::handleMigration(Context &context, CommandStreamReceive
|
||||
if (migrationSyncData->getCurrentLocation() != targetRootDeviceIndex) {
|
||||
migrateMemory(context, *memoryManager, memObj, targetRootDeviceIndex);
|
||||
}
|
||||
migrationSyncData->signalUsage(targetCsr.getTagAddress(), targetCsr.peekTaskCount() + 1);
|
||||
if (!context.getSpecialQueue(targetRootDeviceIndex)->isWaitForTimestampsEnabled()) {
|
||||
migrationSyncData->signalUsage(targetCsr.getTagAddress(), targetCsr.peekTaskCount() + 1);
|
||||
}
|
||||
}
|
||||
|
||||
void MigrationController::migrateMemory(Context &context, MemoryManager &memoryManager, MemObj *memObj, uint32_t targetRootDeviceIndex) {
|
||||
auto &multiGraphicsAllocation = memObj->getMultiGraphicsAllocation();
|
||||
auto migrationSyncData = multiGraphicsAllocation.getMigrationSyncData();
|
||||
if (migrationSyncData->isMigrationInProgress()) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto sourceRootDeviceIndex = migrationSyncData->getCurrentLocation();
|
||||
if (sourceRootDeviceIndex == std::numeric_limits<uint32_t>::max()) {
|
||||
|
||||
Reference in New Issue
Block a user