fix: usm reuse cleaner mt tests

Related-To: NEO-13425

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
Dominik Dabek
2025-01-22 14:01:19 +00:00
committed by Compute-Runtime-Automation
parent 6c6cc26b19
commit 9cfc6e6bbe
4 changed files with 67 additions and 4 deletions

View File

@@ -10,8 +10,24 @@
namespace NEO {
struct MockUnifiedMemoryReuseCleaner : public UnifiedMemoryReuseCleaner {
public:
using UnifiedMemoryReuseCleaner::keepCleaning;
using UnifiedMemoryReuseCleaner::runCleaning;
using UnifiedMemoryReuseCleaner::svmAllocationCaches;
using UnifiedMemoryReuseCleaner::trimOldInCaches;
void startThread() override{};
using UnifiedMemoryReuseCleaner::unifiedMemoryReuseCleanerThread;
void trimOldInCaches() override {
trimOldInCachesCalled = true;
if (callBaseTrimOldInCaches) {
UnifiedMemoryReuseCleaner::trimOldInCaches();
}
}
void startThread() override {
if (callBaseStartThread) {
UnifiedMemoryReuseCleaner::startThread();
}
};
bool trimOldInCachesCalled = false;
bool callBaseStartThread = false;
bool callBaseTrimOldInCaches = true;
};
} // namespace NEO