From b012013a5887d7d7b387e1369de94460039292a3 Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Sat, 16 Sep 2017 20:24:35 -0700 Subject: [PATCH] Revert "Do not invoke GPU method when use_gpu=false" --- .../gserver/gradientmachines/RecurrentGradientMachine.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/paddle/gserver/gradientmachines/RecurrentGradientMachine.cpp b/paddle/gserver/gradientmachines/RecurrentGradientMachine.cpp index b71431b9074..9f29b974669 100644 --- a/paddle/gserver/gradientmachines/RecurrentGradientMachine.cpp +++ b/paddle/gserver/gradientmachines/RecurrentGradientMachine.cpp @@ -18,7 +18,6 @@ limitations under the License. */ #include #include #include -#include #include "NeuralNetwork.h" #include "paddle/gserver/layers/AgentLayer.h" #include "paddle/utils/Flags.h" @@ -430,11 +429,7 @@ void RecurrentGradientMachine::reorganizeInput(PassType passType) { } { - std::unique_ptr asyncBlock; - - if (useGpu_) { - asyncBlock.reset(new AsyncGpuBlock()); - } + AsyncGpuBlock asyncGpuBlock; // inFrameLine select rows in real layer one time for (size_t i = 0; i < inFrameLines_.size(); i++) { -- GitLab