Add device.Wait() in fetch_op (#5141)

fix-typo
Yu Yang 7 years ago committed by QI JUN
parent 94fb7ba4fa
commit 8f4476b893

@ -52,6 +52,7 @@ class FetchOp : public framework::OperatorBase {
// FIXME(yuyang18): Should we assume the fetch operator always generate
// CPU outputs?
dst_item.CopyFrom(src_item, platform::CPUPlace(), dev_ctx);
dev_ctx.Wait();
dst_item.set_lod(src_item.lod());
VLOG(3) << "Fetch variable " << fetch_var_name << " to " << out_name;

Loading…
Cancel
Save