diff --git a/paddle/fluid/memory/detail/system_allocator.cc b/paddle/fluid/memory/detail/system_allocator.cc index 3c82c8aa19af8a6bb820412a6c0d4ac9146b418e..197d1c2f21fd818879aafe17599bc87d33caa198 100644 --- a/paddle/fluid/memory/detail/system_allocator.cc +++ b/paddle/fluid/memory/detail/system_allocator.cc @@ -117,11 +117,6 @@ void* GPUAllocator::Alloc(size_t* index, size_t size) { if (result == cudaSuccess) { *index = 0; gpu_alloc_size_ += size; - if (gpu_alloc_size_ > s_memoryMap[gpu_id_]) { - s_memoryMap[gpu_id_] = gpu_alloc_size_; - VLOG(3) << "device: " << gpu_id_ - << " maximum memory size : " <<(gpu_alloc_size_ >> 20) << " MiB"; - } return p; } else { LOG(WARNING) diff --git a/paddle/fluid/memory/detail/system_allocator.h b/paddle/fluid/memory/detail/system_allocator.h index 1ac1df6de762c0a6e8c95cf79dd5cb96111bce65..a0386a2dad1bb7faf54197a47ca7a5b6d9488817 100644 --- a/paddle/fluid/memory/detail/system_allocator.h +++ b/paddle/fluid/memory/detail/system_allocator.h @@ -15,7 +15,6 @@ limitations under the License. */ #pragma once #include // for size_t -#include namespace paddle { namespace memory { @@ -45,8 +44,6 @@ class CPUAllocator : public SystemAllocator { #ifdef PADDLE_WITH_CUDA class GPUAllocator : public SystemAllocator { public: - std::unordered_map s_memoryMap; - explicit GPUAllocator(int gpu_id) : gpu_id_(gpu_id) {} virtual void* Alloc(size_t* index, size_t size);