mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 18:06:32 +08:00
fix: disable in-order counter patching
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
25fc9f5240
commit
fba837a7ca
@@ -4510,7 +4510,7 @@ void CommandListCoreFamily<gfxCoreFamily>::appendWaitOnSingleEvent(Event *event,
|
||||
|
||||
template <GFXCORE_FAMILY gfxCoreFamily>
|
||||
size_t CommandListCoreFamily<gfxCoreFamily>::addCmdForPatching(std::shared_ptr<NEO::InOrderExecInfo> *externalInOrderExecInfo, void *cmd1, void *cmd2, uint64_t counterValue, NEO::InOrderPatchCommandHelpers::PatchCmdType patchCmdType) {
|
||||
if ((NEO::debugManager.flags.EnableInOrderRegularCmdListPatching.get() != 0) && !isImmediateType()) {
|
||||
if (inOrderCmdsPatchingEnabled()) {
|
||||
this->inOrderPatchCmds.emplace_back(externalInOrderExecInfo, cmd1, cmd2, counterValue, patchCmdType, this->inOrderAtomicSignalingEnabled, this->duplicatedInOrderCounterStorageEnabled);
|
||||
return this->inOrderPatchCmds.size() - 1;
|
||||
}
|
||||
@@ -4616,21 +4616,27 @@ void CommandListCoreFamily<gfxCoreFamily>::encodeMiFlush(uint64_t immediateDataG
|
||||
|
||||
template <GFXCORE_FAMILY gfxCoreFamily>
|
||||
void CommandListCoreFamily<gfxCoreFamily>::updateInOrderExecInfo(size_t inOrderPatchIndex, std::shared_ptr<NEO::InOrderExecInfo> *inOrderExecInfo, bool disablePatchingFlag) {
|
||||
auto &patchCmd = inOrderPatchCmds[inOrderPatchIndex];
|
||||
patchCmd.updateInOrderExecInfo(inOrderExecInfo);
|
||||
patchCmd.setSkipPatching(disablePatchingFlag);
|
||||
if (inOrderCmdsPatchingEnabled()) {
|
||||
auto &patchCmd = inOrderPatchCmds[inOrderPatchIndex];
|
||||
patchCmd.updateInOrderExecInfo(inOrderExecInfo);
|
||||
patchCmd.setSkipPatching(disablePatchingFlag);
|
||||
}
|
||||
}
|
||||
|
||||
template <GFXCORE_FAMILY gfxCoreFamily>
|
||||
inline void CommandListCoreFamily<gfxCoreFamily>::disablePatching(size_t inOrderPatchIndex) {
|
||||
auto &patchCmd = inOrderPatchCmds[inOrderPatchIndex];
|
||||
patchCmd.setSkipPatching(true);
|
||||
if (inOrderCmdsPatchingEnabled()) {
|
||||
auto &patchCmd = inOrderPatchCmds[inOrderPatchIndex];
|
||||
patchCmd.setSkipPatching(true);
|
||||
}
|
||||
}
|
||||
|
||||
template <GFXCORE_FAMILY gfxCoreFamily>
|
||||
inline void CommandListCoreFamily<gfxCoreFamily>::enablePatching(size_t inOrderPatchIndex) {
|
||||
auto &patchCmd = inOrderPatchCmds[inOrderPatchIndex];
|
||||
patchCmd.setSkipPatching(false);
|
||||
if (inOrderCmdsPatchingEnabled()) {
|
||||
auto &patchCmd = inOrderPatchCmds[inOrderPatchIndex];
|
||||
patchCmd.setSkipPatching(false);
|
||||
}
|
||||
}
|
||||
|
||||
template <GFXCORE_FAMILY gfxCoreFamily>
|
||||
|
||||
@@ -350,6 +350,16 @@ void CommandListImp::addRegularCmdListSubmissionCounter() {
|
||||
}
|
||||
}
|
||||
|
||||
bool CommandListImp::inOrderCmdsPatchingEnabled() const {
|
||||
return (!isImmediateType() && NEO::debugManager.flags.EnableInOrderRegularCmdListPatching.get() == 1);
|
||||
}
|
||||
|
||||
void CommandListImp::clearInOrderExecCounterAllocation() {
|
||||
if (isInOrderExecutionEnabled()) {
|
||||
inOrderExecInfo->initializeAllocationsFromHost();
|
||||
}
|
||||
}
|
||||
|
||||
void CommandListImp::enableSynchronizedDispatch(NEO::SynchronizedDispatchMode mode) {
|
||||
if (!device->isImplicitScalingCapable() || this->synchronizedDispatchMode != NEO::SynchronizedDispatchMode::disabled) {
|
||||
return;
|
||||
|
||||
@@ -44,6 +44,8 @@ struct CommandListImp : public CommandList {
|
||||
const std::vector<Event *> &peekMappedEventList() { return mappedTsEventList; }
|
||||
void addRegularCmdListSubmissionCounter();
|
||||
virtual void patchInOrderCmds() = 0;
|
||||
bool inOrderCmdsPatchingEnabled() const;
|
||||
void clearInOrderExecCounterAllocation();
|
||||
void enableSynchronizedDispatch(NEO::SynchronizedDispatchMode mode);
|
||||
NEO::SynchronizedDispatchMode getSynchronizedDispatchMode() const { return synchronizedDispatchMode; }
|
||||
void enableCopyOperationOffload();
|
||||
|
||||
@@ -774,8 +774,14 @@ ze_result_t CommandQueueHw<gfxCoreFamily>::setupCmdListsAndContextParams(
|
||||
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
|
||||
}
|
||||
commandList->storeReferenceTsToMappedEvents(false);
|
||||
commandList->addRegularCmdListSubmissionCounter();
|
||||
commandList->patchInOrderCmds();
|
||||
|
||||
if (commandList->inOrderCmdsPatchingEnabled()) {
|
||||
commandList->addRegularCmdListSubmissionCounter();
|
||||
commandList->patchInOrderCmds();
|
||||
} else {
|
||||
commandList->clearInOrderExecCounterAllocation();
|
||||
}
|
||||
|
||||
commandList->setInterruptEventsCsr(*this->csr);
|
||||
|
||||
auto &commandContainer = commandList->getCmdContainer();
|
||||
|
||||
Reference in New Issue
Block a user