未验证 提交 2a5d858c 编写于 作者: Z zyfncg 提交者: GitHub

Fix code conflict of empty dev_api (#39430)

* fix code conflict

* clear cache

* just try
上级 9d4d0c3b
......@@ -514,8 +514,7 @@ void SparseCooToDenseKernel(const Context& dev_ctx,
auto sparse_offset_meta = pten::DenseTensorMeta(
DataType::INT64, {sparse_dim}, pten::DataLayout::NCHW);
DenseTensor d_sparse_offsets =
pten::Empty<T, Context>(dev_ctx, std::move(sparse_offset_meta));
DenseTensor d_sparse_offsets = Empty(dev_ctx, std::move(sparse_offset_meta));
#ifdef PADDLE_WITH_HIP
PADDLE_ENFORCE_GPU_SUCCESS(
......
......@@ -126,7 +126,7 @@ void SparseCooToDenseKernel(const Context& dev_ctx,
template <typename T, typename Context>
DenseTensor SparseCooToDense(const Context& dev_ctx, const SparseCooTensor& x) {
DenseTensorMeta meta(x.dtype(), x.dims(), x.layout());
DenseTensor dense = pten::Empty<T, Context>(dev_ctx, std::move(meta));
DenseTensor dense = pten::Empty(dev_ctx, std::move(meta));
SparseCooToDenseKernel<T, Context>(dev_ctx, x, &dense);
return dense;
}
......@@ -145,7 +145,7 @@ void SparseCsrToDenseKernel(const Context& dev_ctx,
template <typename T, typename Context>
DenseTensor SparseCsrToDense(const Context& dev_ctx, const SparseCsrTensor& x) {
DenseTensorMeta meta(x.dtype(), x.dims(), x.layout());
DenseTensor dense = pten::Empty<T, Context>(dev_ctx, std::move(meta));
DenseTensor dense = pten::Empty(dev_ctx, std::move(meta));
SparseCsrToDenseKernel<T, Context>(dev_ctx, x, &dense);
return dense;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册