Move aub center and command stream receivers to root device environment

resize root device environments to 1 by default

Related-To: NEO-3691, NEO-3857

Change-Id: Idf3d61e84f8265f30381c18216632d0ffb2a16de
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2019-10-24 13:34:25 +02:00
committed by sys_ocldev
parent eccb9f044d
commit d408b82a19
61 changed files with 286 additions and 277 deletions

View File

@@ -9,13 +9,13 @@
#include "common/helpers/bit_helpers.h"
#include "core/command_stream/preemption_mode.h"
#include "core/helpers/aligned_memory.h"
#include "core/helpers/common_types.h"
#include "core/memory_manager/gfx_partition.h"
#include "core/memory_manager/graphics_allocation.h"
#include "core/memory_manager/host_ptr_defines.h"
#include "core/memory_manager/local_memory_usage.h"
#include "core/page_fault_manager/cpu_page_fault_manager.h"
#include "public/cl_ext_private.h"
#include "runtime/helpers/common_types.h"
#include "runtime/helpers/engine_control.h"
#include "runtime/memory_manager/allocation_properties.h"

View File

@@ -213,11 +213,12 @@ void OsAgnosticMemoryManager::freeGraphicsMemoryImpl(GraphicsAllocation *gfxAllo
releaseReservedCpuAddressRange(gfxAllocation->getReservedAddressPtr(), gfxAllocation->getReservedAddressSize());
}
auto aubCenter = executionEnvironment.aubCenter.get();
if (aubCenter && aubCenter->getAubManager() && DebugManager.flags.EnableFreeMemory.get()) {
aubCenter->getAubManager()->freeMemory(gfxAllocation->getGpuAddress(), gfxAllocation->getUnderlyingBufferSize());
if (executionEnvironment.rootDeviceEnvironments.size() > 0) {
auto aubCenter = executionEnvironment.rootDeviceEnvironments[0].aubCenter.get();
if (aubCenter && aubCenter->getAubManager() && DebugManager.flags.EnableFreeMemory.get()) {
aubCenter->getAubManager()->freeMemory(gfxAllocation->getGpuAddress(), gfxAllocation->getUnderlyingBufferSize());
}
}
delete gfxAllocation;
}
@@ -257,7 +258,7 @@ MemoryManager::AllocationStatus OsAgnosticMemoryManager::populateOsHandles(OsHan
void OsAgnosticMemoryManager::cleanOsHandles(OsHandleStorage &handleStorage) {
for (unsigned int i = 0; i < maxFragmentsCount; i++) {
if (handleStorage.fragmentStorageData[i].freeTheFragment) {
auto aubCenter = executionEnvironment.aubCenter.get();
auto aubCenter = executionEnvironment.rootDeviceEnvironments[0].aubCenter.get();
if (aubCenter && aubCenter->getAubManager() && DebugManager.flags.EnableFreeMemory.get()) {
aubCenter->getAubManager()->freeMemory((uint64_t)handleStorage.fragmentStorageData[i].cpuPtr, handleStorage.fragmentStorageData[i].fragmentSize);
}