Skip to content

Commit

Permalink
randperm run error in multi-gpus (PaddlePaddle#27942)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhupengyang committed Oct 20, 2020
1 parent 74fadeb commit 6dd64b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion paddle/fluid/operators/randperm_op.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class RandpermKernel : public framework::OpKernel<T> {
tmp_tensor.Resize(framework::make_ddim({n}));
T* tmp_data = tmp_tensor.mutable_data<T>(platform::CPUPlace());
random_permate<T>(tmp_data, n, seed);
framework::TensorCopy(tmp_tensor, platform::CUDAPlace(), out_tensor);
framework::TensorCopy(tmp_tensor, ctx.GetPlace(), out_tensor);
}
}
};
Expand Down

0 comments on commit 6dd64b0

Please sign in to comment.