Skip to content

Commit

Permalink
Add small performance tweak
Browse files Browse the repository at this point in the history
Related-To: NEO-5019

Signed-off-by: Zbigniew Zdanowicz <[email protected]>
  • Loading branch information
zzdanowicz authored and Compute-Runtime-Automation committed Sep 23, 2022
1 parent 46e0317 commit fbc9188
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions level_zero/core/source/cmdqueue/cmdqueue_hw.inl
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,6 @@ void CommandQueueHw<gfxCoreFamily>::programOneCmdListBatchBufferStart(CommandLis

auto &returnPoints = commandList->getReturnPoints();
uint32_t returnPointsSize = commandList->getReturnPointsSize();
uint32_t cmdBufferProgress = 0;
uint32_t returnPointIdx = 0;

for (size_t iter = 0; iter < cmdBufferCount; iter++) {
Expand All @@ -896,7 +895,7 @@ void CommandQueueHw<gfxCoreFamily>::programOneCmdListBatchBufferStart(CommandLis
NEO::EncodeBatchBufferStartOrEnd<GfxFamily>::programBatchBufferStart(&cmdStream, startOffset, true);
if (returnPointsSize > 0) {
bool cmdBufferHasRestarts = std::find_if(
std::next(returnPoints.begin(), cmdBufferProgress),
std::next(returnPoints.begin(), returnPointIdx),
returnPoints.end(),
[allocation](CmdListReturnPoint &retPt) {
return retPt.currentCmdBuffer == allocation;
Expand All @@ -914,7 +913,6 @@ void CommandQueueHw<gfxCoreFamily>::programOneCmdListBatchBufferStart(CommandLis
true);
returnPointIdx++;
}
cmdBufferProgress++;
}
}
}
Expand Down

0 comments on commit fbc9188

Please sign in to comment.