mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 16:24:18 +08:00
fix: correct scope for usm allocations indirect access lock
Related-To: NEO-10356 Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
9e14eaaed1
commit
09c9b555f9
@@ -491,6 +491,7 @@ inline ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::executeCommand
|
||||
|
||||
static_cast<CommandQueueHw<gfxCoreFamily> *>(this->cmdQImmediate)->patchCommands(*this, 0u, false);
|
||||
} else {
|
||||
lockForIndirect = std::move(*outerLockForIndirect);
|
||||
cmdQImp->makeResidentForResidencyContainer(this->commandContainer.getResidencyContainer());
|
||||
}
|
||||
|
||||
@@ -1773,6 +1774,7 @@ ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::appendCommandLists(ui
|
||||
|
||||
auto queueImp = static_cast<CommandQueueImp *>(this->cmdQImmediate);
|
||||
auto mainAppendLock = queueImp->getCsr()->obtainUniqueOwnership();
|
||||
std::unique_lock<std::mutex> mainLockForIndirect;
|
||||
|
||||
if (this->dispatchCmdListBatchBufferAsPrimary) {
|
||||
// check if wait event preamble or implicit synchronization is present and force bb start jump in queue, even when no preamble is required there
|
||||
@@ -1784,7 +1786,7 @@ ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::appendCommandLists(ui
|
||||
nullptr,
|
||||
true,
|
||||
this->commandContainer.getCommandStream(),
|
||||
nullptr);
|
||||
&mainLockForIndirect);
|
||||
if (ret != ZE_RESULT_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
@@ -1817,7 +1819,7 @@ ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::appendCommandLists(ui
|
||||
hSignalEvent,
|
||||
requireTaskCountUpdate,
|
||||
&mainAppendLock,
|
||||
nullptr);
|
||||
&mainLockForIndirect);
|
||||
}
|
||||
|
||||
} // namespace L0
|
||||
|
||||
@@ -112,7 +112,7 @@ ze_result_t CommandQueueHw<gfxCoreFamily>::executeCommandLists(
|
||||
csr->isProgramActivePartitionConfigRequired(),
|
||||
performMigration,
|
||||
csr->getSipSentFlag()};
|
||||
|
||||
ctx.outerLockForIndirect = outerLockForIndirect;
|
||||
ctx.globalInit |= ctx.isDebugEnabled &&
|
||||
!this->commandQueueDebugCmdsProgrammed &&
|
||||
device->getL0Debugger();
|
||||
@@ -300,7 +300,8 @@ ze_result_t CommandQueueHw<gfxCoreFamily>::executeCommandListsRegular(
|
||||
|
||||
std::unique_lock<std::mutex> lockForIndirect;
|
||||
if (ctx.hasIndirectAccess) {
|
||||
handleIndirectAllocationResidency(ctx.unifiedMemoryControls, lockForIndirect, ctx.isMigrationRequested);
|
||||
std::unique_lock<std::mutex> ¤tLock = ctx.outerLockForIndirect != nullptr ? *ctx.outerLockForIndirect : lockForIndirect;
|
||||
handleIndirectAllocationResidency(ctx.unifiedMemoryControls, currentLock, ctx.isMigrationRequested);
|
||||
}
|
||||
|
||||
size_t linearStreamSizeEstimate = this->estimateLinearStreamSizeInitial(ctx);
|
||||
|
||||
Reference in New Issue
Block a user