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
[ROCm/clr commit: 04b696abee]
This commit is contained in:
@@ -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_;
|
||||
|
||||
Reference in New Issue
Block a user