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 authored and German Andryeyev committed 2023-05-05 15:31:26 -04:00
1 родитель f14e8a2dba
Коммит 04b696abee
14 files changed
+341 -49

No files matched your search

+6 -4
Просмотреть файл
@@ -53,10 +53,12 @@ bool Device::Create() {
return false;
}
uint64_t max_size = std::numeric_limits<uint64_t>::max();
// Use maximum value to hold memory, because current implementation doesn't support VM
// Note: the call for the threshold is always successful
auto error = graph_mem_pool_->SetAttribute(hipMemPoolAttrReleaseThreshold, &max_size);
if (!HIP_MEM_POOL_USE_VM) {
uint64_t max_size = std::numeric_limits<uint64_t>::max();
// Use maximum value to hold memory, because current implementation doesn't support VM
// Note: the call for the threshold is always successful
auto error = graph_mem_pool_->SetAttribute(hipMemPoolAttrReleaseThreshold, &max_size);
}
// Current is default pool after device creation
current_mem_pool_ = default_mem_pool_;