From 2a5d858c422e61363d1418dc823e14165668064d Mon Sep 17 00:00:00 2001 From: zyfncg Date: Thu, 10 Feb 2022 08:42:15 +0800 Subject: [PATCH] Fix code conflict of empty dev_api (#39430) * fix code conflict * clear cache * just try --- paddle/pten/kernels/sparse/gpu/sparse_utils_kernel.cu | 3 +-- paddle/pten/kernels/sparse/sparse_utils_kernel.h | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/paddle/pten/kernels/sparse/gpu/sparse_utils_kernel.cu b/paddle/pten/kernels/sparse/gpu/sparse_utils_kernel.cu index cd3124bd02f..f2ea9ee3932 100644 --- a/paddle/pten/kernels/sparse/gpu/sparse_utils_kernel.cu +++ b/paddle/pten/kernels/sparse/gpu/sparse_utils_kernel.cu @@ -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(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( diff --git a/paddle/pten/kernels/sparse/sparse_utils_kernel.h b/paddle/pten/kernels/sparse/sparse_utils_kernel.h index 0e880bc5af5..97f51eeeb4b 100644 --- a/paddle/pten/kernels/sparse/sparse_utils_kernel.h +++ b/paddle/pten/kernels/sparse/sparse_utils_kernel.h @@ -126,7 +126,7 @@ void SparseCooToDenseKernel(const Context& dev_ctx, template DenseTensor SparseCooToDense(const Context& dev_ctx, const SparseCooTensor& x) { DenseTensorMeta meta(x.dtype(), x.dims(), x.layout()); - DenseTensor dense = pten::Empty(dev_ctx, std::move(meta)); + DenseTensor dense = pten::Empty(dev_ctx, std::move(meta)); SparseCooToDenseKernel(dev_ctx, x, &dense); return dense; } @@ -145,7 +145,7 @@ void SparseCsrToDenseKernel(const Context& dev_ctx, template DenseTensor SparseCsrToDense(const Context& dev_ctx, const SparseCsrTensor& x) { DenseTensorMeta meta(x.dtype(), x.dims(), x.layout()); - DenseTensor dense = pten::Empty(dev_ctx, std::move(meta)); + DenseTensor dense = pten::Empty(dev_ctx, std::move(meta)); SparseCsrToDenseKernel(dev_ctx, x, &dense); return dense; } -- GitLab