提交 b4e18243 编写于 作者: Y Yu Yang

Fix CI

上级 0708a155
......@@ -272,11 +272,10 @@ struct TensorSetConstantWithPlace : public boost::static_visitor<void> {
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
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册