Limit allocations in execute command list

Reserve space in ResidencyContainer

Related-To: NEO-6837

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
Dominik Dabek
2022-04-06 13:59:23 +00:00
committed by Compute-Runtime-Automation
parent 8d5c674110
commit 4044320301
4 changed files with 6 additions and 1 deletions

View File

@@ -49,6 +49,8 @@ CommandContainer::CommandContainer() {
for (auto &allocationIndirectHeap : allocationIndirectHeaps) {
allocationIndirectHeap = nullptr;
}
residencyContainer.reserve(startingResidencyContainerSize);
}
CommandContainer::CommandContainer(uint32_t maxNumAggregatedIdds) : CommandContainer() {

View File

@@ -39,6 +39,7 @@ class CommandContainer : public NonCopyableOrMovableClass {
static constexpr size_t cmdBufferReservedSize = MemoryConstants::cacheLineSize +
CSRequirements::csOverfetchSize;
static constexpr size_t totalCmdBufferSize = defaultListCmdBufferSize + cmdBufferReservedSize;
static constexpr size_t startingResidencyContainerSize = 128;
CommandContainer();

View File

@@ -45,7 +45,7 @@ CommandStreamReceiver::CommandStreamReceiver(ExecutionEnvironment &executionEnvi
uint32_t rootDeviceIndex,
const DeviceBitfield deviceBitfield)
: executionEnvironment(executionEnvironment), rootDeviceIndex(rootDeviceIndex), deviceBitfield(deviceBitfield) {
residencyAllocations.reserve(20);
residencyAllocations.reserve(startingResidencyContainerSize);
latestSentStatelessMocsConfig = CacheSettings::unknownMocs;
submissionAggregator.reset(new SubmissionAggregator());

View File

@@ -67,6 +67,8 @@ enum class DispatchMode {
class CommandStreamReceiver {
public:
static constexpr size_t startingResidencyContainerSize = 128;
enum class SamplerCacheFlushState {
samplerCacheFlushNotRequired,
samplerCacheFlushBefore, //add sampler cache flush before Walker with redescribed image