diff --git a/paddle/pten/kernels/sparse/gpu/sparse_utils_kernel.cu b/paddle/pten/kernels/sparse/gpu/sparse_utils_kernel.cu index cd3124bd02fcbedc0052c37c2cefe10b4d73a747..f2ea9ee39320b169e1dee5d80c4b17d15f5dad65 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 0e880bc5af53a9c6aee8f41454b4522dc311ed28..97f51eeeb4bbb6616a4734bac6c5a505dc948474 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; }