fix: earlier stopping of usm reuse cleaner thread

Usm cleaner needs to stop before usm reuse cleanup.

Related-To: HSD-18043613805

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
Dominik Dabek
2025-10-14 15:40:26 +00:00
committed by Compute-Runtime-Automation
parent f827cda964
commit f126203df3
4 changed files with 17 additions and 6 deletions

View File

@@ -49,9 +49,6 @@ ExecutionEnvironment::~ExecutionEnvironment() {
if (directSubmissionController) {
directSubmissionController->stopThread();
}
if (unifiedMemoryReuseCleaner) {
unifiedMemoryReuseCleaner->stopThread();
}
if (memoryManager) {
memoryManager->commonCleanup();
for (const auto &rootDeviceEnvironment : this->rootDeviceEnvironments) {
@@ -177,6 +174,9 @@ void ExecutionEnvironment::prepareRootDeviceEnvironments(uint32_t numRootDevices
}
void ExecutionEnvironment::prepareForCleanup() const {
if (unifiedMemoryReuseCleaner) {
unifiedMemoryReuseCleaner->stopThread();
}
for (auto &rootDeviceEnvironment : rootDeviceEnvironments) {
if (rootDeviceEnvironment) {
rootDeviceEnvironment->prepareForCleanup();