Disable EU fusion based on kernel properties from compiler

Related-To: NEO-6633

Signed-off-by: Konstanty Misiak <konstanty.misiak@intel.com>
This commit is contained in:
Konstanty Misiak
2022-02-10 23:33:40 +00:00
committed by Compute-Runtime-Automation
parent 13bc2300e1
commit cf1bc3a2ba
37 changed files with 228 additions and 95 deletions

View File

@@ -120,6 +120,33 @@ HWTEST_F(CommandQueueExecuteCommandLists, whenACommandListExecutedRequiresUncach
commandQueue->destroy();
}
HWTEST_F(CommandQueueExecuteCommandLists, givenCommandListThatRequiresDisabledEUFusionWhenExecutingCommandListsThenCommandQueueHasProperStreamProperties) {
struct WhiteBoxCommandList : public L0::CommandList {
using CommandList::CommandList;
using CommandList::requiredStreamState;
};
const ze_command_queue_desc_t desc{};
ze_result_t returnValue;
auto commandQueue = whitebox_cast(CommandQueue::create(productFamily,
device,
neoDevice->getDefaultEngine().commandStreamReceiver,
&desc,
false,
false,
returnValue));
ASSERT_NE(nullptr, commandQueue->commandStream);
auto commandList1 = static_cast<WhiteBoxCommandList *>(CommandList::fromHandle(commandLists[0]));
commandList1->requiredStreamState.frontEndState.disableEUFusion.set(true);
auto result = commandQueue->executeCommandLists(numCommandLists, commandLists, nullptr, true);
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
EXPECT_EQ(1, commandQueue->getCsr()->getStreamProperties().frontEndState.disableEUFusion.value);
commandQueue->destroy();
}
HWTEST_F(CommandQueueExecuteCommandLists, whenASecondLevelBatchBufferPerCommandListAddedThenProperSizeExpected) {
using MI_BATCH_BUFFER_START = typename FamilyType::MI_BATCH_BUFFER_START;
using MI_BATCH_BUFFER_END = typename FamilyType::MI_BATCH_BUFFER_END;

View File

@@ -222,7 +222,7 @@ HWTEST2_F(CommandQueueCommandsPvc, whenExecuteCommandListsIsCalledThenAdditional
auto hCommandListBA = commandListBA->toHandle();
// Set state B
csr->getStreamProperties().frontEndState.setProperties(true, false, false, *NEO::defaultHwInfo);
csr->getStreamProperties().frontEndState.setProperties(true, false, false, false, *NEO::defaultHwInfo);
// Execute command list AB
commandQueue->executeCommandLists(1, &hCommandListAB, nullptr, false);
@@ -243,7 +243,7 @@ HWTEST2_F(CommandQueueCommandsPvc, whenExecuteCommandListsIsCalledThenAdditional
EXPECT_EQ(true, genCmdCast<CFE_STATE *>(*cfeStates[0])->getComputeDispatchAllWalkerEnable());
// Set state A
csr->getStreamProperties().frontEndState.setProperties(false, false, false, *NEO::defaultHwInfo);
csr->getStreamProperties().frontEndState.setProperties(false, false, false, false, *NEO::defaultHwInfo);
// Execute command list BA
commandQueue->executeCommandLists(1, &hCommandListBA, nullptr, false);