From 900765224c812577a382897ac0da0951e3e3df0d Mon Sep 17 00:00:00 2001 From: sneaxiy Date: Wed, 5 Dec 2018 14:45:11 +0800 Subject: [PATCH] fix deallocate bug test=develop --- paddle/fluid/platform/device_context.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/paddle/fluid/platform/device_context.cc b/paddle/fluid/platform/device_context.cc index d0a108f905f..5444fe3175f 100644 --- a/paddle/fluid/platform/device_context.cc +++ b/paddle/fluid/platform/device_context.cc @@ -127,9 +127,7 @@ class EigenCudaStreamDevice : public Eigen::StreamInterface { return retv; } - void deallocate(void* buffer) const override { - allocations_.erase(allocations_.find(buffer)); - } + void deallocate(void* buffer) const override { allocations_.erase(buffer); } void* scratchpad() const override { if (scratch_ == NULL) { -- GitLab