Migrate shared-allocations made resident with makeMemoryResident

Shared-allocations are currently migrated to GPU by the page-fault
manager when calling executeCommandLists. Allocations to migrate are
taken from the lists container. However, if a shared-allocation
has been made resident with zeContextMakeMemoryResident(), it is not
added to the list container, and hence it is not migrated to device.

So, add a container of resident allocations to the driver and migrate
them along with the other allocations.

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
This commit is contained in:
Jaime Arteaga
2020-12-10 07:54:28 +00:00
committed by Compute-Runtime-Automation
parent d9eb19e6c4
commit d46bb59508
5 changed files with 321 additions and 10 deletions

View File

@@ -26,7 +26,7 @@ class PageFaultManager : public NonCopyableOrMovableClass {
virtual ~PageFaultManager() = default;
void moveAllocationToGpuDomain(void *ptr);
MOCKABLE_VIRTUAL void moveAllocationToGpuDomain(void *ptr);
void moveAllocationsWithinUMAllocsManagerToGpuDomain(SVMAllocsManager *unifiedMemoryManager);
void insertAllocation(void *ptr, size_t size, SVMAllocsManager *unifiedMemoryManager, void *cmdQ, const MemoryProperties &memoryProperties);
void removeAllocation(void *ptr);