Revert "performance: increase cl buffer pool size"

This reverts commit 6e67271454.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
Compute-Runtime-Validation
2025-10-18 04:18:42 +02:00
committed by Compute-Runtime-Automation
parent 7c96076d5e
commit 681eac2f13
14 changed files with 102 additions and 87 deletions

View File

@@ -8,7 +8,6 @@
#pragma once
#include "shared/source/helpers/constants.h"
#include "shared/source/helpers/non_copyable_or_moveable.h"
#include "shared/source/utilities/buffer_pool_params.h"
#include "shared/source/utilities/stackvec.h"
#include <functional>
@@ -24,6 +23,31 @@ class HeapAllocator;
class MemoryManager;
class ProductHelper;
struct SmallBuffersParams {
size_t aggregatedSmallBuffersPoolSize{0};
size_t smallBufferThreshold{0};
size_t chunkAlignment{0};
size_t startingOffset{0};
static SmallBuffersParams getDefaultParams() {
return {
.aggregatedSmallBuffersPoolSize = 2 * MemoryConstants::megaByte,
.smallBufferThreshold = 1 * MemoryConstants::megaByte,
.chunkAlignment = MemoryConstants::pageSize64k,
.startingOffset = MemoryConstants::pageSize64k};
}
static SmallBuffersParams getLargePagesParams() {
return {
.aggregatedSmallBuffersPoolSize = 16 * MemoryConstants::megaByte,
.smallBufferThreshold = 2 * MemoryConstants::megaByte,
.chunkAlignment = MemoryConstants::pageSize64k,
.startingOffset = MemoryConstants::pageSize64k};
}
static inline SmallBuffersParams getPreferredBufferPoolParams(const ProductHelper &productHelper);
};
template <typename PoolT, typename BufferType, typename BufferParentType = BufferType>
struct AbstractBuffersPool : public NonCopyableClass {
// The prototype of a function allocating the `mainStorage` is not specified.

View File

@@ -14,6 +14,10 @@
namespace NEO {
inline SmallBuffersParams SmallBuffersParams::getPreferredBufferPoolParams(const ProductHelper &productHelper) {
return productHelper.is2MBLocalMemAlignmentEnabled() ? SmallBuffersParams::getLargePagesParams() : SmallBuffersParams::getDefaultParams();
}
template <typename PoolT, typename BufferType, typename BufferParentType>
AbstractBuffersPool<PoolT, BufferType, BufferParentType>::AbstractBuffersPool(MemoryManager *memoryManager, OnChunkFreeCallback onChunkFreeCb)
: AbstractBuffersPool<PoolT, BufferType, BufferParentType>::AbstractBuffersPool(memoryManager, onChunkFreeCb, SmallBuffersParams::getDefaultParams()) {}

View File

@@ -1,22 +0,0 @@
/*
* Copyright (C) 2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/helpers/constants.h"
namespace NEO {
struct SmallBuffersParams {
size_t aggregatedSmallBuffersPoolSize{0};
size_t smallBufferThreshold{0};
size_t chunkAlignment{0};
size_t startingOffset{0};
static SmallBuffersParams getDefaultParams();
};
} // namespace NEO