Refactor Sip Kernel usage

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2020-12-02 10:22:27 +00:00
committed by Compute-Runtime-Automation
parent da779d067f
commit 8198a739c8
30 changed files with 190 additions and 251 deletions

View File

@@ -7,6 +7,7 @@
#include "shared/source/execution_environment/execution_environment.h"
#include "shared/source/built_ins/built_ins.h"
#include "shared/source/execution_environment/root_device_environment.h"
#include "shared/source/helpers/hw_helper.h"
#include "shared/source/memory_manager/memory_manager.h"
@@ -19,6 +20,11 @@ ExecutionEnvironment::ExecutionEnvironment() = default;
ExecutionEnvironment::~ExecutionEnvironment() {
if (memoryManager) {
memoryManager->commonCleanup();
for (const auto &rootDeviceEnvironment : this->rootDeviceEnvironments) {
if (rootDeviceEnvironment->builtins.get()) {
rootDeviceEnvironment->builtins.get()->freeSipKernels(memoryManager.get());
}
}
}
rootDeviceEnvironments.clear();
}