mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
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:
committed by
Compute-Runtime-Automation
parent
2eab7a12c9
commit
3c43276dab
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user