Files
compute-runtime/shared/test/common/memory_manager/mock_prefetch_manager.h
Slawomir Milczarek 5c1b50bccf Add memory prefetch modes for single and multiple subdevices
Single-subdevice prefetch for cmd list copy-only (with bcs) and acc mode.
Multi-subdevice prefetch (default) for shared allocation with multiple BOs.

Related-To: NEO-6740

Signed-off-by: Slawomir Milczarek <slawomir.milczarek@intel.com>
2022-12-07 15:25:32 +01:00

30 lines
900 B
C++

/*
* Copyright (C) 2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/memory_manager/prefetch_manager.h"
#include "shared/source/memory_manager/unified_memory_manager.h"
using namespace NEO;
class MockPrefetchManager : public PrefetchManager {
public:
void migrateAllocationsToGpu(PrefetchContext &prefetchContext, SVMAllocsManager &unifiedMemoryManager, Device &device, CommandStreamReceiver &csr) override {
PrefetchManager::migrateAllocationsToGpu(prefetchContext, unifiedMemoryManager, device, csr);
migrateAllocationsToGpuCalled = true;
}
void removeAllocations(PrefetchContext &prefetchContext) override {
PrefetchManager::removeAllocations(prefetchContext);
removeAllocationsCalled = true;
}
bool migrateAllocationsToGpuCalled = false;
bool removeAllocationsCalled = false;
};