Skip to content

Commit 2e61733

Browse files
committed
fix errors in lod_reset_op
1 parent e309f42 commit 2e61733

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

paddle/fluid/operators/lod_reset_op.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ class LoDResetKernel : public framework::OpKernel<T> {
4646
auto* lod = lod_t->data<int>();
4747
if (platform::is_gpu_place(ctx.GetPlace())) {
4848
framework::Tensor lod_cpu;
49-
framework::TensorCopy(*lod_t, platform::CPUPlace(),
50-
ctx.device_context(), &lod_cpu);
49+
framework::TensorCopySync(*lod_t, platform::CPUPlace(), &lod_cpu);
5150
lod = lod_cpu.data<int>();
5251
}
5352
level0 = std::vector<int>(lod, lod + lod_t->numel());

0 commit comments

Comments
 (0)