mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-11 08:07:19 +08:00
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:
committed by
Compute-Runtime-Automation
parent
7c96076d5e
commit
681eac2f13
@@ -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.
|
||||
|
||||
@@ -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()) {}
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user