Change default engines for BCS split

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2022-08-30 12:29:12 +00:00
committed by Compute-Runtime-Automation
parent a3dedcc7ee
commit 399758ef17
4 changed files with 17 additions and 17 deletions

View File

@ -422,7 +422,7 @@ class CommandQueue : public BaseObject<_cl_command_queue> {
bool bcsInitialized = false;
bool bcsSplitInitialized = false;
BcsInfoMask splitEngines = EngineHelpers::evenLinkedCopyEnginesMask;
BcsInfoMask splitEngines = EngineHelpers::oddLinkedCopyEnginesMask;
LinearStream *commandStream = nullptr;

View File

@ -354,7 +354,7 @@ HWTEST_F(IoqCommandQueueHwBlitTest, givenSplitBcsCopyWhenEnqueueReadThenEnqueueB
auto csr1 = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
std::unique_ptr<OsContext> osContext1(OsContext::create(pDevice->getExecutionEnvironment()->rootDeviceEnvironments[0]->osInterface.get(), 0,
EngineDescriptorHelper::getDefaultDescriptor({aub_stream::ENGINE_BCS2, EngineUsage::Regular},
EngineDescriptorHelper::getDefaultDescriptor({aub_stream::ENGINE_BCS1, EngineUsage::Regular},
PreemptionMode::ThreadGroup, pDevice->getDeviceBitfield())));
csr1->setupContext(*osContext1);
csr1->initializeTagAllocation();
@ -362,14 +362,14 @@ HWTEST_F(IoqCommandQueueHwBlitTest, givenSplitBcsCopyWhenEnqueueReadThenEnqueueB
auto csr2 = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
std::unique_ptr<OsContext> osContext2(OsContext::create(pDevice->getExecutionEnvironment()->rootDeviceEnvironments[0]->osInterface.get(), 0,
EngineDescriptorHelper::getDefaultDescriptor({aub_stream::ENGINE_BCS4, EngineUsage::Regular},
EngineDescriptorHelper::getDefaultDescriptor({aub_stream::ENGINE_BCS3, EngineUsage::Regular},
PreemptionMode::ThreadGroup, pDevice->getDeviceBitfield())));
csr2->setupContext(*osContext2);
csr2->initializeTagAllocation();
EngineControl control2(csr2.get(), osContext2.get());
cmdQHw->bcsEngines[2] = &control1;
cmdQHw->bcsEngines[4] = &control2;
cmdQHw->bcsEngines[1] = &control1;
cmdQHw->bcsEngines[3] = &control2;
BcsSplitBufferTraits::context = context;
auto buffer = clUniquePtr(BufferHelper<BcsSplitBufferTraits>::create());
@ -401,7 +401,7 @@ HWTEST_F(IoqCommandQueueHwBlitTest, givenSplitBcsCopyWhenEnqueueBlockingReadThen
auto csr1 = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
std::unique_ptr<OsContext> osContext1(OsContext::create(pDevice->getExecutionEnvironment()->rootDeviceEnvironments[0]->osInterface.get(), 0,
EngineDescriptorHelper::getDefaultDescriptor({aub_stream::ENGINE_BCS2, EngineUsage::Regular},
EngineDescriptorHelper::getDefaultDescriptor({aub_stream::ENGINE_BCS1, EngineUsage::Regular},
PreemptionMode::ThreadGroup, pDevice->getDeviceBitfield())));
csr1->setupContext(*osContext1);
csr1->initializeTagAllocation();
@ -409,14 +409,14 @@ HWTEST_F(IoqCommandQueueHwBlitTest, givenSplitBcsCopyWhenEnqueueBlockingReadThen
auto csr2 = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
std::unique_ptr<OsContext> osContext2(OsContext::create(pDevice->getExecutionEnvironment()->rootDeviceEnvironments[0]->osInterface.get(), 0,
EngineDescriptorHelper::getDefaultDescriptor({aub_stream::ENGINE_BCS4, EngineUsage::Regular},
EngineDescriptorHelper::getDefaultDescriptor({aub_stream::ENGINE_BCS3, EngineUsage::Regular},
PreemptionMode::ThreadGroup, pDevice->getDeviceBitfield())));
csr2->setupContext(*osContext2);
csr2->initializeTagAllocation();
EngineControl control2(csr2.get(), osContext2.get());
cmdQHw->bcsEngines[2] = &control1;
cmdQHw->bcsEngines[4] = &control2;
cmdQHw->bcsEngines[1] = &control1;
cmdQHw->bcsEngines[3] = &control2;
BcsSplitBufferTraits::context = context;
auto buffer = clUniquePtr(BufferHelper<BcsSplitBufferTraits>::create());
@ -448,7 +448,7 @@ HWTEST_F(IoqCommandQueueHwBlitTest, givenSplitBcsCopyWhenEnqueueReadWithEventThe
auto csr1 = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
std::unique_ptr<OsContext> osContext1(OsContext::create(pDevice->getExecutionEnvironment()->rootDeviceEnvironments[0]->osInterface.get(), 0,
EngineDescriptorHelper::getDefaultDescriptor({aub_stream::ENGINE_BCS2, EngineUsage::Regular},
EngineDescriptorHelper::getDefaultDescriptor({aub_stream::ENGINE_BCS1, EngineUsage::Regular},
PreemptionMode::ThreadGroup, pDevice->getDeviceBitfield())));
csr1->setupContext(*osContext1);
csr1->initializeTagAllocation();
@ -456,14 +456,14 @@ HWTEST_F(IoqCommandQueueHwBlitTest, givenSplitBcsCopyWhenEnqueueReadWithEventThe
auto csr2 = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
std::unique_ptr<OsContext> osContext2(OsContext::create(pDevice->getExecutionEnvironment()->rootDeviceEnvironments[0]->osInterface.get(), 0,
EngineDescriptorHelper::getDefaultDescriptor({aub_stream::ENGINE_BCS4, EngineUsage::Regular},
EngineDescriptorHelper::getDefaultDescriptor({aub_stream::ENGINE_BCS3, EngineUsage::Regular},
PreemptionMode::ThreadGroup, pDevice->getDeviceBitfield())));
csr2->setupContext(*osContext2);
csr2->initializeTagAllocation();
EngineControl control2(csr2.get(), osContext2.get());
cmdQHw->bcsEngines[2] = &control1;
cmdQHw->bcsEngines[4] = &control2;
cmdQHw->bcsEngines[1] = &control1;
cmdQHw->bcsEngines[3] = &control2;
BcsSplitBufferTraits::context = context;
auto buffer = clUniquePtr(BufferHelper<BcsSplitBufferTraits>::create());

View File

@ -178,11 +178,11 @@ HWTEST2_F(CommandQueuePvcAndLaterTests, whenSelectCsrForHostPtrAllocationThenRet
queue->constructBcsEnginesForSplit();
EXPECT_EQ(4u, queue->countBcsEngines());
auto &csr1 = queue->selectCsrForHostPtrAllocation(true, *queue->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS2));
auto &csr1 = queue->selectCsrForHostPtrAllocation(true, *queue->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS1));
EXPECT_EQ(&csr1, &queue->getGpgpuCommandStreamReceiver());
auto &csr2 = queue->selectCsrForHostPtrAllocation(false, *queue->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS2));
EXPECT_EQ(&csr2, queue->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS2));
auto &csr2 = queue->selectCsrForHostPtrAllocation(false, *queue->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS1));
EXPECT_EQ(&csr2, queue->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS1));
}
HWTEST2_F(CommandQueuePvcAndLaterTests, whenPrepareHostPtrSurfaceForSplitThenSetTaskCountsToZero, IsAtLeastXeHpcCore) {

View File

@ -65,7 +65,7 @@ constexpr bool isLinkBcs(aub_stream::EngineType engineType) {
}
constexpr uint32_t numLinkedCopyEngines = 8u;
constexpr size_t evenLinkedCopyEnginesMask = 0b101010100;
constexpr size_t oddLinkedCopyEnginesMask = 0b010101010;
bool linkCopyEnginesSupported(const HardwareInfo &hwInfo, const DeviceBitfield &deviceBitfield);