Skip to content

Commit f8be841

Browse files
feature: add support for wait event preamble in append command list
- add mechanism in queue to trigger start command from queue to regular - add detection in immediate command list need to dispatch extra start in queue - fix secondary linear stream in immediate case as it should not use container - modify tests for primary batch buffer dispatch as default mode - remove invalid or obsolete tests Related-To: NEO-10356 Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
1 parent 571e0f2 commit f8be841

File tree

11 files changed

+110
-100
lines changed

11 files changed

+110
-100
lines changed

level_zero/core/source/cmdlist/cmdlist_hw_immediate.inl

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,9 @@ inline ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::executeCommand
438438
size_t commandStreamStart = this->cmdListCurrentStartOffset;
439439
if (appendOperation == NEO::AppendOperations::cmdList && this->dispatchCmdListBatchBufferAsPrimary) {
440440
auto cmdListStartCmdBufferStream = reinterpret_cast<CommandQueueImp *>(cmdQ)->getStartingCmdBuffer();
441-
// check if queue starting stream is the same as immediate, if not - regular cmdlist is the starting command buffer
441+
// check if queue starting stream is the same as immediate,
442+
// if they are the same - immediate command list buffer has preamble in it including jump from immediate to regular cmdlist - proceed normal
443+
// if not - regular cmdlist is the starting command buffer - no queue preamble or waiting commands
442444
if (cmdListStartCmdBufferStream != commandStream) {
443445
commandStream = cmdListStartCmdBufferStream;
444446
commandStreamStart = 0u;
@@ -1720,7 +1722,16 @@ ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::appendCommandLists(ui
17201722
return ret;
17211723
}
17221724

1723-
auto mainAppendLock = static_cast<CommandQueueImp *>(this->cmdQImmediate)->getCsr()->obtainUniqueOwnership();
1725+
auto queueImp = static_cast<CommandQueueImp *>(this->cmdQImmediate);
1726+
1727+
auto mainAppendLock = queueImp->getCsr()->obtainUniqueOwnership();
1728+
1729+
if (this->dispatchCmdListBatchBufferAsPrimary) {
1730+
// check if wait event preamble or implicit synchronization is present and force bb start jump in queue, even when no preamble is required there
1731+
if (this->commandContainer.getCommandStream()->getUsed() != this->cmdListCurrentStartOffset) {
1732+
queueImp->triggerBbStartJump();
1733+
}
1734+
}
17241735
ret = this->cmdQImmediate->executeCommandLists(numCommandLists, phCommandLists, nullptr, true, this->commandContainer.getCommandStream());
17251736
if (ret != ZE_RESULT_SUCCESS) {
17261737
return ret;

level_zero/core/source/cmdqueue/cmdqueue_hw.inl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ size_t CommandQueueHw<gfxCoreFamily>::estimateStreamSizeForExecuteCommandListsRe
253253
linearStreamSizeEstimate += NEO::EncodeBatchBufferStartOrEnd<GfxFamily>::getBatchBufferEndSize();
254254
}
255255

256-
linearStreamSizeEstimate += this->estimateCommandListPrimaryStart(ctx.globalInit);
256+
linearStreamSizeEstimate += this->estimateCommandListPrimaryStart(ctx.globalInit || this->forceBbStartJump);
257257
for (uint32_t i = 0; i < numCommandLists; i++) {
258258
auto cmdList = CommandList::fromHandle(commandListHandles[i]);
259259
linearStreamSizeEstimate += estimateCommandListSecondaryStart(cmdList);
@@ -486,7 +486,7 @@ ze_result_t CommandQueueHw<gfxCoreFamily>::executeCommandListsCopyOnly(
486486
ctx.spaceForResidency += estimateCommandListResidencySize(commandList);
487487
}
488488

489-
linearStreamSizeEstimate += this->estimateCommandListPrimaryStart(ctx.globalInit);
489+
linearStreamSizeEstimate += this->estimateCommandListPrimaryStart(ctx.globalInit || this->forceBbStartJump);
490490
if (fenceRequired) {
491491
linearStreamSizeEstimate += NEO::MemorySynchronizationCommands<GfxFamily>::getSizeForSingleAdditionalSynchronization(device->getNEODevice()->getRootDeviceEnvironment());
492492
}
@@ -1020,7 +1020,7 @@ size_t CommandQueueHw<gfxCoreFamily>::estimateLinearStreamSizeComplementary(
10201020
}
10211021

10221022
bool firstCmdlistDynamicPreamble = (this->stateChanges.size() > 0 && this->stateChanges[0].cmdListIndex == 0);
1023-
bool estimateBbStartForGlobalInitOnly = !firstCmdlistDynamicPreamble && ctx.globalInit;
1023+
bool estimateBbStartForGlobalInitOnly = !firstCmdlistDynamicPreamble && (ctx.globalInit || this->forceBbStartJump);
10241024
linearStreamSizeEstimate += this->estimateCommandListPrimaryStart(estimateBbStartForGlobalInitOnly);
10251025

10261026
return linearStreamSizeEstimate;
@@ -1217,7 +1217,7 @@ void CommandQueueHw<gfxCoreFamily>::programOneCmdListBatchBufferStartPrimaryBatc
12171217
auto bbStartPatchLocation = reinterpret_cast<MI_BATCH_BUFFER_START *>(ctx.currentPatchForChainedBbStart);
12181218

12191219
bool dynamicPreamble = ctx.childGpuAddressPositionBeforeDynamicPreamble != commandStream.getCurrentGpuAddressPosition();
1220-
if (ctx.globalInit || dynamicPreamble) {
1220+
if (ctx.globalInit || dynamicPreamble || this->forceBbStartJump) {
12211221
if (ctx.currentPatchForChainedBbStart) {
12221222
// dynamic preamble, 2nd or later command list
12231223
// jump from previous command list to the position before dynamic preamble
@@ -1230,6 +1230,7 @@ void CommandQueueHw<gfxCoreFamily>::programOneCmdListBatchBufferStartPrimaryBatc
12301230
NEO::EncodeBatchBufferStartOrEnd<GfxFamily>::programBatchBufferStart(&commandStream, cmdListFirstCmdBuffer->getGpuAddress(), false, false, false);
12311231

12321232
ctx.globalInit = false;
1233+
this->forceBbStartJump = false;
12331234
} else {
12341235
if (ctx.currentPatchForChainedBbStart == nullptr) {
12351236
// nothing to dispatch from queue, first command list will be used as submitting batch buffer to KMD or ULLS

level_zero/core/source/cmdqueue/cmdqueue_imp.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ struct CommandQueueImp : public CommandQueue {
114114
NEO::LinearStream *getStartingCmdBuffer() const {
115115
return startingCmdBuffer;
116116
}
117+
void triggerBbStartJump() {
118+
forceBbStartJump = true;
119+
}
117120

118121
protected:
119122
MOCKABLE_VIRTUAL NEO::SubmissionStatus submitBatchBuffer(size_t offset, NEO::ResidencyContainer &residencyContainer, void *endingCmdPtr,
@@ -171,6 +174,7 @@ struct CommandQueueImp : public CommandQueue {
171174

172175
std::atomic<bool> cmdListWithAssertExecuted = false;
173176
bool useKmdWaitFunction = false;
177+
bool forceBbStartJump = false;
174178
};
175179

176180
} // namespace L0

level_zero/core/test/unit_tests/mocks/mock_cmdlist.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ struct WhiteBox<::L0::CommandListCoreFamily<gfxCoreFamily>>
9292
using BaseClass::inOrderAtomicSignalingEnabled;
9393
using BaseClass::inOrderExecInfo;
9494
using BaseClass::inOrderPatchCmds;
95+
using BaseClass::internalUsage;
9596
using BaseClass::interruptEvents;
9697
using BaseClass::isFlushTaskSubmissionEnabled;
9798
using BaseClass::isInOrderNonWalkerSignalingRequired;
@@ -217,6 +218,7 @@ struct WhiteBox<L0::CommandListCoreFamilyImmediate<gfxCoreFamily>>
217218
using BaseClass::inOrderAtomicSignalingEnabled;
218219
using BaseClass::inOrderExecInfo;
219220
using BaseClass::inOrderPatchCmds;
221+
using BaseClass::internalUsage;
220222
using BaseClass::interruptEvents;
221223
using BaseClass::isBcsSplitNeeded;
222224
using BaseClass::isFlushTaskSubmissionEnabled;
@@ -264,6 +266,7 @@ struct MockCommandListImmediate : public CommandListCoreFamilyImmediate<gfxCoreF
264266
using BaseClass::finalStreamState;
265267
using BaseClass::immediateCmdListHeapSharing;
266268
using BaseClass::indirectAllocationsAllowed;
269+
using BaseClass::internalUsage;
267270
using BaseClass::isFlushTaskSubmissionEnabled;
268271
using BaseClass::isSyncModeQueue;
269272
using BaseClass::isTbxMode;
@@ -708,6 +711,7 @@ class MockCommandListImmediateHw : public WhiteBox<::L0::CommandListCoreFamilyIm
708711
using BaseClass::dcFlushSupport;
709712
using BaseClass::dependenciesPresent;
710713
using BaseClass::dummyBlitWa;
714+
using BaseClass::internalUsage;
711715
using BaseClass::isFlushTaskSubmissionEnabled;
712716
using BaseClass::isSyncModeQueue;
713717
using BaseClass::isTbxMode;

level_zero/core/test/unit_tests/mocks/mock_cmdqueue.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ struct WhiteBox<::L0::CommandQueue> : public ::L0::CommandQueueImp {
3131
using BaseClass::desc;
3232
using BaseClass::device;
3333
using BaseClass::firstCmdListStream;
34+
using BaseClass::forceBbStartJump;
3435
using BaseClass::preemptionCmdSyncProgramming;
3536
using BaseClass::printfKernelContainer;
3637
using BaseClass::startingCmdBuffer;
@@ -77,6 +78,7 @@ struct MockCommandQueueHw : public L0::CommandQueueHw<gfxCoreFamily> {
7778
using BaseClass::commandStream;
7879
using BaseClass::estimateStreamSizeForExecuteCommandListsRegularHeapless;
7980
using BaseClass::executeCommandListsRegularHeapless;
81+
using BaseClass::forceBbStartJump;
8082
using BaseClass::prepareAndSubmitBatchBuffer;
8183
using BaseClass::printfKernelContainer;
8284
using BaseClass::startingCmdBuffer;

level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_4.cpp

Lines changed: 63 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1584,8 +1584,8 @@ HWTEST2_F(ImmediateCommandListTest, givenImmediateCmdListWhenAppendingRegularThe
15841584
auto startStream = static_cast<L0::CommandQueueImp *>(commandListImmediate->cmdQImmediate)->getStartingCmdBuffer();
15851585

15861586
if (commandListImmediate->getCmdListBatchBufferFlag()) {
1587-
auto expectedStream = commandList->getCmdContainer().getCommandStream();
1588-
EXPECT_EQ(expectedStream, startStream);
1587+
auto expectedStreamAllocation = commandList->getCmdContainer().getCommandStream()->getGraphicsAllocation();
1588+
EXPECT_EQ(expectedStreamAllocation, startStream->getGraphicsAllocation());
15891589
} else {
15901590
auto expectedStream = commandListImmediate->getCmdContainer().getCommandStream();
15911591
EXPECT_EQ(expectedStream, startStream);
@@ -1696,5 +1696,66 @@ HWTEST2_F(ImmediateCommandListTest,
16961696
EXPECT_NE(cmdList.end(), iterator);
16971697
}
16981698

1699+
HWTEST2_F(ImmediateCommandListTest,
1700+
givenImmediateCmdListWithPrimaryBatchBufferWhenAppendingRegularCmdListWithWaitEventThenDispatchSemaphoreAndJumpFromImmediateToRegular, MatchAny) {
1701+
using MI_BATCH_BUFFER_START = typename FamilyType::MI_BATCH_BUFFER_START;
1702+
using MI_SEMAPHORE_WAIT = typename FamilyType::MI_SEMAPHORE_WAIT;
1703+
1704+
ze_event_pool_desc_t eventPoolDesc = {ZE_STRUCTURE_TYPE_EVENT_POOL_DESC};
1705+
eventPoolDesc.flags = ZE_EVENT_POOL_FLAG_HOST_VISIBLE;
1706+
eventPoolDesc.count = 2;
1707+
1708+
ze_event_desc_t eventDesc = {ZE_STRUCTURE_TYPE_EVENT_DESC};
1709+
eventDesc.index = 0;
1710+
eventDesc.wait = 0;
1711+
eventDesc.signal = 0;
1712+
1713+
ze_result_t returnValue;
1714+
std::unique_ptr<EventPool> eventPool = std::unique_ptr<EventPool>(static_cast<EventPool *>(EventPool::create(driverHandle.get(), context, 0, nullptr, &eventPoolDesc, returnValue)));
1715+
std::unique_ptr<L0::Event> event = std::unique_ptr<L0::Event>(getHelper<L0GfxCoreHelper>().createEvent(eventPool.get(), &eventDesc, device));
1716+
auto eventHandle = event->toHandle();
1717+
1718+
commandList->close();
1719+
auto cmdListHandle = commandList->toHandle();
1720+
1721+
auto regularCmdBufferStream = commandList->getCmdContainer().getCommandStream();
1722+
auto regularCmdBufferAllocation = regularCmdBufferStream->getGraphicsAllocation();
1723+
1724+
auto cmdQImmediate = static_cast<WhiteBox<::L0::CommandQueue> *>(commandListImmediate->cmdQImmediate);
1725+
1726+
commandListImmediate->dispatchCmdListBatchBufferAsPrimary = true;
1727+
cmdQImmediate->dispatchCmdListBatchBufferAsPrimary = true;
1728+
1729+
// first append can carry preamble
1730+
returnValue = commandListImmediate->appendCommandLists(1, &cmdListHandle, nullptr, 0, nullptr);
1731+
EXPECT_EQ(ZE_RESULT_SUCCESS, returnValue);
1732+
1733+
auto immediateCmdBufferStream = commandListImmediate->getCmdContainer().getCommandStream();
1734+
auto offsetBefore = immediateCmdBufferStream->getUsed();
1735+
1736+
// no preamble but wait event as first, then bb_start jumping to regular cmdlist
1737+
returnValue = commandListImmediate->appendCommandLists(1, &cmdListHandle, nullptr, 1, &eventHandle);
1738+
EXPECT_EQ(ZE_RESULT_SUCCESS, returnValue);
1739+
1740+
auto offsetAfter = immediateCmdBufferStream->getUsed();
1741+
1742+
GenCmdList cmdList;
1743+
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
1744+
cmdList,
1745+
ptrOffset(immediateCmdBufferStream->getCpuBase(), offsetBefore),
1746+
offsetAfter - offsetBefore));
1747+
1748+
auto iteratorWait = find<MI_SEMAPHORE_WAIT *>(cmdList.begin(), cmdList.end());
1749+
ASSERT_NE(cmdList.end(), iteratorWait);
1750+
1751+
auto iteratorBbStart = find<MI_BATCH_BUFFER_START *>(iteratorWait, cmdList.end());
1752+
ASSERT_NE(cmdList.end(), iteratorBbStart);
1753+
1754+
auto bbStart = genCmdCast<MI_BATCH_BUFFER_START *>(*iteratorBbStart);
1755+
1756+
EXPECT_EQ(regularCmdBufferAllocation->getGpuAddress(), bbStart->getBatchBufferStartAddress());
1757+
EXPECT_EQ(MI_BATCH_BUFFER_START::SECOND_LEVEL_BATCH_BUFFER::SECOND_LEVEL_BATCH_BUFFER_FIRST_LEVEL_BATCH, bbStart->getSecondLevelBatchBuffer());
1758+
}
1759+
16991760
} // namespace ult
17001761
} // namespace L0

level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel_3.cpp

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,52 +1201,5 @@ HWTEST2_F(MultiTileImmediateCommandListAppendLaunchKernelXeHpCoreTest, givenImpl
12011201
EXPECT_EQ(cmdList.end(), itorSemaphoreWait);
12021202
}
12031203

1204-
HWTEST2_F(MultiTileImmediateCommandListAppendLaunchKernelXeHpCoreTest, givenImplicitScalingWhenUsingImmediateCommandListWithoutFlushTaskThenUseSecondaryBuffer, IsAtLeastXeHpCore) {
1205-
using WalkerVariant = typename FamilyType::WalkerVariant;
1206-
1207-
using MI_BATCH_BUFFER_START = typename FamilyType::MI_BATCH_BUFFER_START;
1208-
1209-
debugManager.flags.UsePipeControlAfterPartitionedWalker.set(1);
1210-
1211-
ze_group_count_t groupCount{128, 1, 1};
1212-
1213-
ze_command_queue_desc_t queueDesc = {};
1214-
auto queue = std::make_unique<Mock<CommandQueue>>(device, device->getNEODevice()->getDefaultEngine().commandStreamReceiver, &queueDesc);
1215-
1216-
auto immediateCmdList = std::make_unique<WhiteBox<::L0::CommandListCoreFamily<gfxCoreFamily>>>();
1217-
immediateCmdList->cmdListType = ::L0::CommandList::CommandListType::typeImmediate;
1218-
immediateCmdList->isFlushTaskSubmissionEnabled = false;
1219-
immediateCmdList->cmdQImmediate = queue.get();
1220-
auto result = immediateCmdList->initialize(device, NEO::EngineGroupType::compute, 0u);
1221-
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
1222-
1223-
auto cmdStream = immediateCmdList->getCmdContainer().getCommandStream();
1224-
1225-
auto sizeBefore = cmdStream->getUsed();
1226-
CmdListKernelLaunchParams launchParams = {};
1227-
result = immediateCmdList->appendLaunchKernelWithParams(kernel.get(), groupCount, nullptr, launchParams);
1228-
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
1229-
auto sizeAfter = cmdStream->getUsed();
1230-
1231-
GenCmdList cmdList;
1232-
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
1233-
cmdList,
1234-
ptrOffset(cmdStream->getCpuBase(), sizeBefore),
1235-
sizeAfter - sizeBefore));
1236-
1237-
auto itorWalker = NEO::UnitTestHelper<FamilyType>::findWalkerTypeCmd(cmdList.begin(), cmdList.end());
1238-
ASSERT_NE(cmdList.end(), itorWalker);
1239-
1240-
WalkerVariant walkerCmd = NEO::UnitTestHelper<FamilyType>::getWalkerVariant(*itorWalker);
1241-
std::visit([](auto &&walker) {
1242-
EXPECT_TRUE(walker->getWorkloadPartitionEnable());
1243-
},
1244-
walkerCmd);
1245-
1246-
auto itorBbStart = find<MI_BATCH_BUFFER_START *>(cmdList.begin(), cmdList.end());
1247-
ASSERT_NE(cmdList.end(), itorBbStart);
1248-
auto cmdBbStart = genCmdCast<MI_BATCH_BUFFER_START *>(*itorBbStart);
1249-
EXPECT_EQ(MI_BATCH_BUFFER_START::SECOND_LEVEL_BATCH_BUFFER::SECOND_LEVEL_BATCH_BUFFER_SECOND_LEVEL_BATCH, cmdBbStart->getSecondLevelBatchBuffer());
1250-
}
12511204
} // namespace ult
12521205
} // namespace L0

level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_wait_on_events.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,16 +214,23 @@ HWTEST2_F(CommandListAppendWaitOnEvent, givenImmediateCmdListAndAppendingRegular
214214
std::unique_ptr<L0::CommandList> commandListRegular(CommandList::create(productFamily, device, NEO::EngineGroupType::compute, 0u, returnValue, false));
215215
commandListRegular->close();
216216
auto commandListHandle = commandListRegular->toHandle();
217+
218+
// 1st append can carry preamble
217219
auto result = immCommandList->appendCommandLists(1u, &commandListHandle, nullptr, 1u, &hEventHandle);
220+
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
221+
222+
// 2nd append should carry only wait events and bb_start to regular command list
223+
auto usedSpaceBefore = immCommandList->getCmdContainer().getCommandStream()->getUsed();
218224

225+
result = immCommandList->appendCommandLists(1u, &commandListHandle, nullptr, 1u, &hEventHandle);
219226
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
220227

221228
auto usedSpaceAfter = immCommandList->getCmdContainer().getCommandStream()->getUsed();
222229

223230
GenCmdList cmdList;
224231
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(cmdList,
225-
immCommandList->getCmdContainer().getCommandStream()->getCpuBase(),
226-
usedSpaceAfter));
232+
ptrOffset(immCommandList->getCmdContainer().getCommandStream()->getCpuBase(), usedSpaceBefore),
233+
usedSpaceAfter - usedSpaceBefore));
227234

228235
auto itor = find<MI_SEMAPHORE_WAIT *>(cmdList.begin(), cmdList.end());
229236
ASSERT_NE(cmdList.end(), itor);

level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_1.cpp

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -540,48 +540,6 @@ HWTEST_F(CommandQueueCreate, givenUpdateTaskCountFromWaitAndRegularCmdListWhenDi
540540
commandQueue->destroy();
541541
}
542542

543-
HWTEST_F(CommandQueueCreate, givenUpdateTaskCountFromWaitAndImmediateCmdListWhenDispatchTaskCountWriteThenNoPipeControlFlushed) {
544-
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
545-
using POST_SYNC_OPERATION = typename FamilyType::PIPE_CONTROL::POST_SYNC_OPERATION;
546-
547-
DebugManagerStateRestore restorer;
548-
debugManager.flags.UpdateTaskCountFromWait.set(3);
549-
550-
const ze_command_queue_desc_t desc = {};
551-
ze_result_t returnValue;
552-
auto commandQueue = whiteboxCast(CommandQueue::create(productFamily,
553-
device,
554-
neoDevice->getDefaultEngine().commandStreamReceiver,
555-
&desc,
556-
false,
557-
false,
558-
true,
559-
returnValue));
560-
561-
auto commandList = CommandList::createImmediate(productFamily, device, &desc, false, NEO::EngineGroupType::renderCompute, returnValue);
562-
ASSERT_NE(nullptr, commandList);
563-
564-
ze_command_list_handle_t cmdListHandle = commandList->toHandle();
565-
commandQueue->executeCommandLists(1, &cmdListHandle, nullptr, false, nullptr);
566-
567-
GenCmdList cmdList;
568-
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
569-
cmdList, ptrOffset(commandQueue->commandStream.getCpuBase(), 0), commandQueue->commandStream.getUsed()));
570-
571-
auto pipeControls = findAll<PIPE_CONTROL *>(cmdList.begin(), cmdList.end());
572-
bool pipeControlsPostSync = false;
573-
for (size_t i = 0; i < pipeControls.size(); i++) {
574-
auto pipeControl = reinterpret_cast<PIPE_CONTROL *>(*pipeControls[i]);
575-
if (pipeControl->getPostSyncOperation() == POST_SYNC_OPERATION::POST_SYNC_OPERATION_WRITE_IMMEDIATE_DATA) {
576-
pipeControlsPostSync = true;
577-
}
578-
}
579-
EXPECT_FALSE(pipeControlsPostSync);
580-
581-
commandList->destroy();
582-
commandQueue->destroy();
583-
}
584-
585543
HWTEST_F(CommandQueueCreate, givenContainerWithAllocationsWhenResidencyContainerIsEmptyThenMakeResidentWasNotCalled) {
586544
auto csr = std::make_unique<MockCommandStreamReceiver>(*neoDevice->getExecutionEnvironment(), 0, neoDevice->getDeviceBitfield());
587545
csr->setupContext(*neoDevice->getDefaultEngine().osContext);

shared/source/command_container/cmdcontainer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ CommandContainer::ErrorCode CommandContainer::initialize(Device *device, Allocat
112112
return ErrorCode::outOfDeviceMemory;
113113
}
114114
secondaryCommandStreamForImmediateCmdList = std::make_unique<LinearStream>(cmdBufferAllocationHost->getUnderlyingBuffer(),
115-
usableSize, this, this->selectedBbCmdSize);
115+
usableSize, cmdcontainer, this->selectedBbCmdSize);
116116
secondaryCommandStreamForImmediateCmdList->replaceGraphicsAllocation(cmdBufferAllocationHost);
117117
cmdBufferAllocations.push_back(cmdBufferAllocationHost);
118118
addToResidencyContainer(cmdBufferAllocationHost);

0 commit comments

Comments
 (0)