performance: redesign usm alloc reuse mechanism

Dedicated pools for different allocations size ranges.
Additional reused allocations will create their own pools.
Do not reuse allocations >256MB.

Related-To: NEO-6893, NEO-12299, NEO-12349

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
Dominik Dabek
2024-09-10 15:50:05 +00:00
committed by Compute-Runtime-Automation
parent dfbad8029b
commit b2fc7345cf
20 changed files with 976 additions and 60 deletions

View File

@@ -38,6 +38,7 @@ class GfxCoreHelper;
class ProductHelper;
class CompilerProductHelper;
class ReleaseHelper;
class UsmMemAllocPoolsManager;
struct SelectorCopyEngine : NonCopyableOrMovableClass {
std::atomic<bool> isMainUsed = false;
@@ -194,6 +195,9 @@ class Device : public ReferenceTrackedObject<Device> {
ISAPoolAllocator &getIsaPoolAllocator() {
return isaPoolAllocator;
}
UsmMemAllocPoolsManager *getUsmMemAllocPoolsManager() {
return deviceUsmMemAllocPoolsManager.get();
}
MOCKABLE_VIRTUAL void stopDirectSubmissionAndWaitForCompletion();
bool isAnyDirectSubmissionEnabled();
bool isStateSipRequired() const {
@@ -290,6 +294,7 @@ class Device : public ReferenceTrackedObject<Device> {
std::vector<RTDispatchGlobalsInfo *> rtDispatchGlobalsInfos;
ISAPoolAllocator isaPoolAllocator;
std::unique_ptr<UsmMemAllocPoolsManager> deviceUsmMemAllocPoolsManager;
struct {
bool isValid = false;