fix: create new InOrderExecInfo on cmd list reset

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2024-04-17 15:43:32 +00:00
committed by Compute-Runtime-Automation
parent cb984b3e4b
commit 02ebb857cb
3 changed files with 8 additions and 2 deletions

View File

@@ -145,7 +145,8 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::reset() {
mappedTsEventList.clear();
if (inOrderExecInfo) {
inOrderExecInfo->reset();
inOrderExecInfo.reset();
enableInOrderExecution();
}
latestOperationRequiredNonWalkerInOrderCmdsChaining = false;

View File

@@ -5555,13 +5555,17 @@ HWTEST2_F(InOrderRegularCmdListTests, givenInOrderModeWhenDispatchingRegularCmdL
}
regularCmdList->inOrderExecInfo->setAllocationOffset(123);
auto hostAddr = static_cast<uint64_t *>(regularCmdList->inOrderExecInfo->getDeviceCounterAllocation()->getUnderlyingBuffer());
auto hostAddr = static_cast<uint64_t *>(regularCmdList->inOrderExecInfo->getBaseHostAddress());
*hostAddr = 0x1234;
regularCmdList->latestOperationRequiredNonWalkerInOrderCmdsChaining = true;
auto originalInOrderExecInfo = regularCmdList->inOrderExecInfo;
regularCmdList->reset();
EXPECT_NE(originalInOrderExecInfo.get(), regularCmdList->inOrderExecInfo.get());
EXPECT_EQ(0u, regularCmdList->inOrderExecInfo->getCounterValue());
EXPECT_EQ(0u, regularCmdList->inOrderExecInfo->getAllocationOffset());
hostAddr = static_cast<uint64_t *>(regularCmdList->inOrderExecInfo->getBaseHostAddress());
EXPECT_EQ(0u, *hostAddr);
EXPECT_FALSE(regularCmdList->latestOperationRequiredNonWalkerInOrderCmdsChaining);
}