feature: add global/const surface nonUSM allocation pooling

Related-To: NEO-12287
Signed-off-by: Fabian Zwoliński <fabian.zwolinski@intel.com>
This commit is contained in:
Fabian Zwoliński
2025-10-29 13:06:06 +00:00
committed by Compute-Runtime-Automation
parent 2eab7a12c9
commit 3c43276dab
16 changed files with 547 additions and 40 deletions

View File

@@ -45,7 +45,11 @@ extern CommandStreamReceiver *createCommandStream(ExecutionEnvironment &executio
const DeviceBitfield deviceBitfield);
Device::Device(ExecutionEnvironment *executionEnvironment, const uint32_t rootDeviceIndex)
: executionEnvironment(executionEnvironment), rootDeviceIndex(rootDeviceIndex), isaPoolAllocator(this), deviceTimestampPoolAllocator(this) {
: executionEnvironment(executionEnvironment), rootDeviceIndex(rootDeviceIndex),
isaPoolAllocator(this),
deviceTimestampPoolAllocator(this),
globalSurfacePoolAllocator(this),
constantSurfacePoolAllocator(this) {
this->executionEnvironment->incRefInternal();
this->executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->setDummyBlitProperties(rootDeviceIndex);
debugger = this->executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->debugger.get();
@@ -77,6 +81,8 @@ Device::~Device() {
syncBufferHandler.reset();
isaPoolAllocator.releasePools();
deviceTimestampPoolAllocator.releasePools();
globalSurfacePoolAllocator.releasePools();
constantSurfacePoolAllocator.releasePools();
if (deviceUsmMemAllocPoolsManager) {
deviceUsmMemAllocPoolsManager->cleanup();
}

View File

@@ -209,6 +209,12 @@ class Device : public ReferenceTrackedObject<Device>, NEO::NonCopyableAndNonMova
TimestampPoolAllocator &getDeviceTimestampPoolAllocator() {
return deviceTimestampPoolAllocator;
}
GlobalSurfacePoolAllocator &getGlobalSurfacePoolAllocator() {
return globalSurfacePoolAllocator;
}
ConstantSurfacePoolAllocator &getConstantSurfacePoolAllocator() {
return constantSurfacePoolAllocator;
}
UsmMemAllocPoolsManager *getUsmMemAllocPoolsManager() {
return deviceUsmMemAllocPoolsManager.get();
}
@@ -365,6 +371,8 @@ class Device : public ReferenceTrackedObject<Device>, NEO::NonCopyableAndNonMova
ISAPoolAllocator isaPoolAllocator;
TimestampPoolAllocator deviceTimestampPoolAllocator;
GlobalSurfacePoolAllocator globalSurfacePoolAllocator;
ConstantSurfacePoolAllocator constantSurfacePoolAllocator;
std::unique_ptr<UsmMemAllocPoolsManager> deviceUsmMemAllocPoolsManager;
std::unique_ptr<UsmMemAllocPool> usmMemAllocPool;
std::unique_ptr<UsmMemAllocPool> usmConstantSurfaceAllocPool;