mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-11 16:45:25 +08:00
feature: Append recorded commandlist into immediate (6/N)
- fix premature call to make non resident Related-To: NEO-10356 Signed-off-by: Aravind Gopalakrishnan <aravind.gopalakrishnan@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
9db0228875
commit
2a6faa64de
@@ -224,6 +224,35 @@ HWTEST2_F(CommandListAppendSignalEvent, givenImmediateCmdListAndAppendingRegular
|
||||
ASSERT_TRUE(postSyncFound);
|
||||
}
|
||||
|
||||
HWTEST2_F(CommandListAppendSignalEvent, givenImmediateCmdListWithComputeQueueAndAppendingRegularCommandlistThenCsrMakeNonTesidentSkippedFromCmdQueue, IsAtLeastXeHpcCore) {
|
||||
ze_command_queue_desc_t desc = {};
|
||||
desc.mode = ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS;
|
||||
|
||||
ze_result_t returnValue;
|
||||
|
||||
using cmdListImmediateHwType = typename L0::CommandListCoreFamilyImmediate<static_cast<GFXCORE_FAMILY>(NEO::HwMapper<productFamily>::gfxFamily)>;
|
||||
|
||||
std::unique_ptr<cmdListImmediateHwType> commandList0(static_cast<cmdListImmediateHwType *>(CommandList::createImmediate(productFamily,
|
||||
device,
|
||||
&desc,
|
||||
false,
|
||||
NEO::EngineGroupType::compute,
|
||||
returnValue)));
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, returnValue);
|
||||
ASSERT_NE(nullptr, commandList0);
|
||||
|
||||
auto &commandStreamReceiver = neoDevice->getUltCommandStreamReceiver<FamilyType>();
|
||||
|
||||
std::unique_ptr<L0::CommandList> commandListRegular(CommandList::create(productFamily, device, NEO::EngineGroupType::compute, 0u, returnValue, false));
|
||||
commandListRegular->close();
|
||||
auto commandListHandle = commandListRegular->toHandle();
|
||||
|
||||
ze_result_t result = ZE_RESULT_SUCCESS;
|
||||
result = commandList0->appendCommandLists(1u, &commandListHandle, nullptr, 0u, nullptr);
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
||||
EXPECT_EQ(1u, commandStreamReceiver.makeSurfacePackNonResidentCalled);
|
||||
}
|
||||
|
||||
HWTEST2_F(CommandListAppendSignalEvent, givenCopyOnlyImmediateCmdListAndAppendingRegularCommandlistWithWaitOnEventsAndSignalEventThenUseSemaphoreAndFlushDw, IsAtLeastXeHpcCore) {
|
||||
using MI_SEMAPHORE_WAIT = typename FamilyType::MI_SEMAPHORE_WAIT;
|
||||
using MI_BATCH_BUFFER_START = typename FamilyType::MI_BATCH_BUFFER_START;
|
||||
@@ -288,6 +317,35 @@ HWTEST2_F(CommandListAppendSignalEvent, givenCopyOnlyImmediateCmdListAndAppendin
|
||||
EXPECT_EQ(expectedMiFlushCount, static_cast<uint32_t>(itorMiFlush.size()));
|
||||
}
|
||||
|
||||
HWTEST2_F(CommandListAppendSignalEvent, givenImmediateCmdListWithCopyQueueAndAppendingRegularCommandlistThenCsrMakeNonTesidentSkippedFromCmdQueue, IsAtLeastXeHpcCore) {
|
||||
ze_command_queue_desc_t desc = {};
|
||||
desc.mode = ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS;
|
||||
|
||||
ze_result_t returnValue;
|
||||
|
||||
using cmdListImmediateHwType = typename L0::CommandListCoreFamilyImmediate<static_cast<GFXCORE_FAMILY>(NEO::HwMapper<productFamily>::gfxFamily)>;
|
||||
|
||||
std::unique_ptr<cmdListImmediateHwType> commandList0(static_cast<cmdListImmediateHwType *>(CommandList::createImmediate(productFamily,
|
||||
device,
|
||||
&desc,
|
||||
false,
|
||||
NEO::EngineGroupType::copy,
|
||||
returnValue)));
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, returnValue);
|
||||
ASSERT_NE(nullptr, commandList0);
|
||||
|
||||
auto &commandStreamReceiver = neoDevice->getUltCommandStreamReceiver<FamilyType>();
|
||||
|
||||
std::unique_ptr<L0::CommandList> commandListRegular(CommandList::create(productFamily, device, NEO::EngineGroupType::copy, 0u, returnValue, false));
|
||||
commandListRegular->close();
|
||||
auto commandListHandle = commandListRegular->toHandle();
|
||||
|
||||
ze_result_t result = ZE_RESULT_SUCCESS;
|
||||
result = commandList0->appendCommandLists(1u, &commandListHandle, nullptr, 0u, nullptr);
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
||||
EXPECT_EQ(1u, commandStreamReceiver.makeSurfacePackNonResidentCalled);
|
||||
}
|
||||
|
||||
HWTEST2_F(CommandListAppendSignalEvent, givenTimestampEventUsedInSignalThenPipeControlAppendedCorrectly, IsAtLeastSkl) {
|
||||
using GfxFamily = typename NEO::GfxFamilyMapper<gfxCoreFamily>::GfxFamily;
|
||||
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
|
||||
|
||||
Reference in New Issue
Block a user