performance: do not consume queue buffer when executing from command list

Related-To: NEO-13916

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2025-03-28 08:32:34 +00:00
committed by Compute-Runtime-Automation
parent 88a48f1c5b
commit ff85d01289
4 changed files with 24 additions and 7 deletions

View File

@@ -1596,6 +1596,19 @@ HWTEST2_F(ImmediateCommandListTest, givenImmediateCmdListWhenAppendingRegularThe
}
}
HWTEST2_F(ImmediateCommandListTest, givenImmediateCmdListWhenAppendingRegularCmdListThenDoNotConsumeQueueInternalLinearStream, MatchAny) {
auto immediateQueue = whiteboxCast(commandListImmediate->cmdQImmediate);
commandList->close();
auto cmdListHandle = commandList->toHandle();
auto usedBefore = immediateQueue->commandStream.getUsed();
commandListImmediate->appendCommandLists(1, &cmdListHandle, nullptr, 0, nullptr);
auto usedAfter = immediateQueue->commandStream.getUsed();
EXPECT_EQ(usedBefore, usedAfter);
}
HWTEST2_F(ImmediateCommandListTest,
givenImmediateCmdListWithPrimaryBatchBufferWhenAppendingRegularCmdListThenCorrectEpilogueCmdBufferIsUsed, MatchAny) {
using MI_BATCH_BUFFER_END = typename FamilyType::MI_BATCH_BUFFER_END;

View File

@@ -458,11 +458,12 @@ HWTEST2_F(CommandQueueCreate, givenSwTagsEnabledWhenPrepareAndSubmitBatchBufferT
template <GFXCORE_FAMILY gfxCoreFamily>
struct MockCommandQueueHwEstimateSizeTest : public MockCommandQueueHw<gfxCoreFamily> {
using CommandListExecutionContext = typename MockCommandQueueHwEstimateSizeTest<gfxCoreFamily>::CommandListExecutionContext;
MockCommandQueueHwEstimateSizeTest(L0::Device *device, NEO::CommandStreamReceiver *csr, const ze_command_queue_desc_t *desc)
: MockCommandQueueHw<gfxCoreFamily>(device, csr, desc) {}
ze_result_t makeAlignedChildStreamAndSetGpuBase(NEO::LinearStream &child, size_t requiredSize) override {
ze_result_t makeAlignedChildStreamAndSetGpuBase(NEO::LinearStream &child, size_t requiredSize, CommandListExecutionContext &ctx) override {
requiredSizeCalled = requiredSize;
return ZE_RESULT_ERROR_DEVICE_LOST;
}