Remove wait on user fence during cmdlist destroy/reset

Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
Related-To: NEO-7156
This commit is contained in:
Kamil Kopryk
2022-08-03 11:05:32 +00:00
committed by Compute-Runtime-Automation
parent c694ccd637
commit 8b5c567bea
4 changed files with 29 additions and 4 deletions

View File

@@ -1082,6 +1082,32 @@ HWTEST2_F(CommandListCreate, GivenGpuHangOnExecutingCommandListsWhenCreatingImme
commandList->cmdQImmediate = oldCommandQueue;
}
TEST_F(CommandListCreate, givenImmediateCommandListWhenThereIsNoEnoughSpaceForImmediateCommandThenNextCommandBufferIsUsed) {
ze_command_queue_desc_t desc = {};
desc.mode = ZE_COMMAND_QUEUE_MODE_SYNCHRONOUS;
ze_result_t returnValue;
std::unique_ptr<L0::CommandList> commandList(CommandList::createImmediate(productFamily, device, &desc, false, NEO::EngineGroupType::RenderCompute, returnValue));
ASSERT_NE(nullptr, commandList);
commandList->isFlushTaskSubmissionEnabled = true;
EXPECT_EQ(device, commandList->device);
EXPECT_EQ(CommandList::CommandListType::TYPE_IMMEDIATE, commandList->cmdListType);
EXPECT_NE(nullptr, commandList->cmdQImmediate);
void *srcPtr = reinterpret_cast<void *>(0x1234);
void *dstPtr = reinterpret_cast<void *>(0x2345);
// reduce available cmd buffer size, so next command can't fit in 1st and we need to use 2nd cmd buffer
size_t useSize = commandList->commandContainer.getCommandStream()->getMaxAvailableSpace() - maxImmediateCommandSize + 1;
commandList->commandContainer.getCommandStream()->getSpace(useSize);
EXPECT_EQ(1U, commandList->commandContainer.getCmdBufferAllocations().size());
auto result = commandList->appendMemoryCopy(dstPtr, srcPtr, 8, nullptr, 0, nullptr);
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
EXPECT_EQ(2U, commandList->commandContainer.getCmdBufferAllocations().size());
}
HWTEST2_F(CommandListCreate, GivenGpuHangOnSynchronizingWhenCreatingImmediateCommandListAndWaitingOnEventsThenDeviceLostIsReturned, IsSKL) {
ze_command_queue_desc_t desc = {};
desc.mode = ZE_COMMAND_QUEUE_MODE_SYNCHRONOUS;