From 802dcd676e8dcf78836d4f8f8fb5c2e333f592d7 Mon Sep 17 00:00:00 2001 From: fengjiayi Date: Wed, 28 Mar 2018 18:48:49 +0800 Subject: [PATCH] remove CPU restrict in While_op --- paddle/fluid/operators/while_op.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/paddle/fluid/operators/while_op.cc b/paddle/fluid/operators/while_op.cc index 8b62b242cf8..8c1a2549e03 100644 --- a/paddle/fluid/operators/while_op.cc +++ b/paddle/fluid/operators/while_op.cc @@ -54,8 +54,6 @@ class WhileOp : public framework::OperatorBase { auto step_scopes = scope.FindVar(Output(kStepScopes))->GetMutable(); - PADDLE_ENFORCE(platform::is_cpu_place(cond.place()), - "Condition of while op must in CPU memory."); while (cond.data()[0]) { auto ¤t_scope = scope.NewScope(); step_scopes->push_back(¤t_scope); -- GitLab