From 46e18cb7000c593e3079339f0d8ba8ab805215b4 Mon Sep 17 00:00:00 2001 From: lujun Date: Wed, 3 Apr 2019 16:09:34 +0800 Subject: [PATCH] Merge pull request #16634 from junjun315/my-cool-stuff fix load bug about context.place --- paddle/fluid/operators/load_op.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/fluid/operators/load_op.cc b/paddle/fluid/operators/load_op.cc index 656728c609..435c755df3 100644 --- a/paddle/fluid/operators/load_op.cc +++ b/paddle/fluid/operators/load_op.cc @@ -29,7 +29,7 @@ class LoadOp : public framework::OperatorWithKernel { framework::OpKernelType GetExpectedKernelType( const framework::ExecutionContext &ctx) const override { framework::OpKernelType kt = framework::OpKernelType( - framework::proto::VarType::FP32, platform::CPUPlace()); + framework::proto::VarType::FP32, ctx.GetPlace()); return kt; } }; -- GitLab