File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -405,7 +405,9 @@ class ReshapeGradKernel {
405
405
auto in_dims = d_x->dims ();
406
406
407
407
d_x->mutable_data (ctx.GetPlace (), d_out->type ());
408
- framework::TensorCopySync (*d_out, ctx.GetPlace (), d_x);
408
+ framework::TensorCopy (
409
+ *d_out, ctx.GetPlace (),
410
+ ctx.template device_context <platform::DeviceContext>(), d_x);
409
411
d_x->Resize (in_dims);
410
412
}
411
413
};
@@ -419,7 +421,9 @@ class ReshapeDoubleGradKernel {
419
421
auto out_dims = dd_out->dims ();
420
422
421
423
dd_out->mutable_data (ctx.GetPlace (), dd_x->type ());
422
- framework::TensorCopySync (*dd_x, ctx.GetPlace (), dd_out);
424
+ framework::TensorCopy (
425
+ *dd_x, ctx.GetPlace (),
426
+ ctx.template device_context <platform::DeviceContext>(), dd_out);
423
427
dd_out->Resize (out_dims);
424
428
}
425
429
};
You can’t perform that action at this time.
0 commit comments