forked from mindspore-Ecosystem/mindspore
!11176 Opt get_func by uniforming format
From: @liangzelang Reviewed-by: @limingqi107,@kisnwang Signed-off-by: @kisnwang
This commit is contained in:
commit
bc276774e3
|
@ -87,7 +87,8 @@ class DynamicMemPoolBestFit {
|
|||
void ReleaseDeviceRes();
|
||||
// Display the information of memory block and memory buf.
|
||||
void DumpDynamicMemPoolInfo();
|
||||
SizeMapMemBuf GetIdleMemBufMap() { return global_idle_mem_buf_map_; }
|
||||
// Get the map of global idle mem buf and size.
|
||||
SizeMapMemBuf global_idle_mem_buf_map() const { return global_idle_mem_buf_map_; }
|
||||
|
||||
// Get the related memory statistics information.
|
||||
size_t total_mem_statistics() const { return total_mem_statistics_; }
|
||||
|
|
|
@ -63,7 +63,7 @@ bool AscendMemoryPool::FreeDeviceMem(const DeviceMemPtr &addr) {
|
|||
}
|
||||
|
||||
void AscendMemoryPool::ResetIdleMemBuf() {
|
||||
auto idle_mem_buf_map = DynamicMemPoolBestFit::GetIdleMemBufMap();
|
||||
auto idle_mem_buf_map = DynamicMemPoolBestFit::global_idle_mem_buf_map();
|
||||
for (auto &it : idle_mem_buf_map) {
|
||||
rtMemset(it.second->device_addr_, it.first, 0, it.first);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue