mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-10 12:53:42 +08:00
Prealloc cmd buffer for CSR only when being used
Related-To: NEO-7361 Currently additional command buffer is preallocated for all CSRs, even for those which won't be used by application. This PR changes that Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
3a58579bbe
commit
a66e69abc9
@ -365,18 +365,18 @@ HWTEST_F(IoqCommandQueueHwBlitTest, givenSplitBcsCopyWhenEnqueueReadThenEnqueueB
|
||||
memoryManager->returnFakeAllocation = true;
|
||||
auto cmdQHw = std::make_unique<MockCommandQueueHw<FamilyType>>(context, pClDevice, nullptr);
|
||||
|
||||
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_BCS1, EngineUsage::Regular},
|
||||
PreemptionMode::ThreadGroup, pDevice->getDeviceBitfield())));
|
||||
auto csr1 = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
csr1->setupContext(*osContext1);
|
||||
csr1->initializeTagAllocation();
|
||||
EngineControl control1(csr1.get(), osContext1.get());
|
||||
|
||||
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_BCS3, EngineUsage::Regular},
|
||||
PreemptionMode::ThreadGroup, pDevice->getDeviceBitfield())));
|
||||
auto csr2 = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
csr2->setupContext(*osContext2);
|
||||
csr2->initializeTagAllocation();
|
||||
EngineControl control2(csr2.get(), osContext2.get());
|
||||
@ -415,18 +415,18 @@ HWTEST_F(IoqCommandQueueHwBlitTest, givenSplitBcsCopyWhenEnqueueBlockingReadThen
|
||||
memoryManager->returnFakeAllocation = true;
|
||||
auto cmdQHw = static_cast<MockCommandQueueHw<FamilyType> *>(this->pCmdQ);
|
||||
|
||||
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_BCS1, EngineUsage::Regular},
|
||||
PreemptionMode::ThreadGroup, pDevice->getDeviceBitfield())));
|
||||
auto csr1 = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
csr1->setupContext(*osContext1);
|
||||
csr1->initializeTagAllocation();
|
||||
EngineControl control1(csr1.get(), osContext1.get());
|
||||
|
||||
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_BCS3, EngineUsage::Regular},
|
||||
PreemptionMode::ThreadGroup, pDevice->getDeviceBitfield())));
|
||||
auto csr2 = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
csr2->setupContext(*osContext2);
|
||||
csr2->initializeTagAllocation();
|
||||
EngineControl control2(csr2.get(), osContext2.get());
|
||||
@ -464,18 +464,18 @@ HWTEST_F(IoqCommandQueueHwBlitTest, givenSplitBcsCopyWhenEnqueueReadWithEventThe
|
||||
memoryManager->returnFakeAllocation = true;
|
||||
auto cmdQHw = static_cast<MockCommandQueueHw<FamilyType> *>(this->pCmdQ);
|
||||
|
||||
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_BCS1, EngineUsage::Regular},
|
||||
PreemptionMode::ThreadGroup, pDevice->getDeviceBitfield())));
|
||||
auto csr1 = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
csr1->setupContext(*osContext1);
|
||||
csr1->initializeTagAllocation();
|
||||
EngineControl control1(csr1.get(), osContext1.get());
|
||||
|
||||
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_BCS3, EngineUsage::Regular},
|
||||
PreemptionMode::ThreadGroup, pDevice->getDeviceBitfield())));
|
||||
auto csr2 = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
csr2->setupContext(*osContext2);
|
||||
csr2->initializeTagAllocation();
|
||||
EngineControl control2(csr2.get(), osContext2.get());
|
||||
|
Reference in New Issue
Block a user