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 작성하고 German Andryeyev가 2023-05-05 15:31:26 -04:00를 커밋함
1 부모 f14e8a2dba
커밋 04b696abee
14 파일이 변경됨
+341 -49

검색과 일치하는 파일 없음

+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_;