未验证 提交 5eaa55da 编写于 作者: L Leo Chen 提交者: GitHub

make selected_row not depends on fluid (#44835)

上级 3b32835f
......@@ -65,7 +65,7 @@ cc_library(
cc_library(
selected_rows
SRCS selected_rows_impl.cc selected_rows.cc
DEPS tensor_base dense_tensor phi_enforce ddim memcpy)
DEPS tensor_base dense_tensor phi_enforce ddim)
cc_library(
phi_device_context
SRCS device_context.cc
......
......@@ -58,9 +58,7 @@ struct TensorCopyVisitor {
void apply() const {
// TODO(Yancey1989): support other place
phi::CPUPlace cpu;
paddle::memory::Copy(cpu,
dst_->mutable_data<T>(cpu) + dst_offset_,
cpu,
std::memcpy(dst_->mutable_data<T>(cpu) + dst_offset_,
src_.data<T>() + src_offset_,
size_ * sizeof(T));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册