SWDEV-353281 - VM support in mempool for graphs

The change enables VM support in graphs on Windows. That allows
to avoid caching of all allocations at the cost of map/unmap
overhead during memory create/destroy.

Change-Id: I792be00fba099e5e5d3cd44a963e1dfd6976a86d
Этот коммит содержится в:
German
2023-05-04 14:54:19 -04:00
коммит произвёл German Andryeyev
родитель f14e8a2dba
Коммит 04b696abee
14 изменённых файлов: 341 добавлений и 49 удалений
+6 -1
Просмотреть файл
@@ -449,9 +449,14 @@ Memory::~Memory() {
parent_->release();
}
hostMemRef_.deallocateMemory(context_());
if (getMemFlags() & CL_MEM_VA_RANGE_AMD) {
amd::MemObjMap::RemoveVirtualMemObj(getSvmPtr());
// If runtime executes graph mempool with VM, then VA can be mapped in space
// for graph validation logic during execution. And the reason it's not unmaped
// in graph itself because the app can have a graph without a free node
if (amd::MemObjMap::FindMemObj(getSvmPtr())) {
amd::MemObjMap::RemoveMemObj(getSvmPtr());
}
}
}