From b4e18243633a9af9609926f4c413f8b22cb6a653 Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Tue, 7 Nov 2017 16:25:04 -0800 Subject: [PATCH] Fix CI --- paddle/operators/math/math_function.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/paddle/operators/math/math_function.cc b/paddle/operators/math/math_function.cc index 175df2030d5..09c3f0b1e6f 100644 --- a/paddle/operators/math/math_function.cc +++ b/paddle/operators/math/math_function.cc @@ -272,11 +272,10 @@ struct TensorSetConstantWithPlace : public boost::static_visitor { void set_constant(const platform::DeviceContext& context, framework::Tensor* tensor, float value) { + TensorSetConstantWithPlace func(context, tensor, value); #ifdef PADDLE_WITH_CUDA - boost::apply_visitor(TensorSetConstantWithPlace(context, tensor, value), - tensor->place()); + tensor->place().apply_visitor(func); #else - TensorSetConstantWithPlace func(context, tensor, value); func(platform::CPUPlace()); #endif } -- GitLab