Skip to content

Commit

Permalink
fix compile
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiqiu committed Jul 29, 2021
1 parent 2b526c0 commit 1df0f63
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion paddle/fluid/framework/tensor_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ void TensorCopy(const Tensor& src, const platform::Place& dst_place,
npu_pinned_tensor.Resize(src.dims());
auto npu_pinned_ptr =
npu_pinned_tensor.mutable_data(npu_pinned_place, src.type());
memory::Copy(npu_pinned_place, npu_pinned_ptr, src_place, src_ptr, size);
memory::Copy(npu_pinned_place, npu_pinned_ptr,
BOOST_GET_CONST(platform::CPUPlace, src_place), src_ptr, size);

// 2. async copy npu pinned tensor -> npu tensor
memory::Copy(
Expand Down

0 comments on commit 1df0f63

Please sign in to comment.