From 4c7b6e2e6762ba279741964d67dbb057045d43ef Mon Sep 17 00:00:00 2001 From: liuwei1031 Date: Tue, 19 Feb 2019 05:23:38 +0000 Subject: [PATCH] fix comment, test=develop --- paddle/fluid/memory/allocation/legacy_allocator.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/fluid/memory/allocation/legacy_allocator.cc b/paddle/fluid/memory/allocation/legacy_allocator.cc index cd1c0b6d1..1936f9d4c 100644 --- a/paddle/fluid/memory/allocation/legacy_allocator.cc +++ b/paddle/fluid/memory/allocation/legacy_allocator.cc @@ -383,7 +383,7 @@ void LegacyMemMonitor::Minus(const int &device, const size_t &size) { uint64_t LegacyMemMonitor::GetMemUsage(const int &device) const { return gpu_mem_info_.find(device) == gpu_mem_info_.end() ? 0 - : gpu_mem_info_.find(device)->second->GetPeakUsage(); + : gpu_mem_info_.at(device)->GetPeakUsage(); } void LegacyMemMonitor::PrintMemUsage() { -- GitLab