From 8f2b0860ebe4bd5998c97dfaf2a29702ffd2b52a Mon Sep 17 00:00:00 2001 From: chentianyu03 Date: Fri, 10 Dec 2021 17:34:27 +0800 Subject: [PATCH] rename TensoCopy (#38036) --- paddle/pten/kernels/hybird/cuda/reduce/reduce_cuda_impl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/pten/kernels/hybird/cuda/reduce/reduce_cuda_impl.h b/paddle/pten/kernels/hybird/cuda/reduce/reduce_cuda_impl.h index 1f1b8ddd5f4..16fc70b9ab7 100644 --- a/paddle/pten/kernels/hybird/cuda/reduce/reduce_cuda_impl.h +++ b/paddle/pten/kernels/hybird/cuda/reduce/reduce_cuda_impl.h @@ -769,7 +769,7 @@ static void LaunchReduceKernel(const Tx* x_data, } } -void TensorCopy(const DenseTensor& src, DenseTensor* dst) { +static void AsyncCopy(const DenseTensor& src, DenseTensor* dst) { paddle::platform::DeviceContextPool& pool = paddle::platform::DeviceContextPool::Instance(); const paddle::platform::CUDADeviceContext* dev_ctx; @@ -817,7 +817,7 @@ void TensorReduceFunctorImpl(const pten::DenseTensor& x, if (config.reduce_num == 1) { auto out_dims = y->dims(); if (x.dtype() == y->dtype()) { - TensorCopy(x, y); + AsyncCopy(x, y); y->Resize(out_dims); } else { PD_VISIT_ALL_TYPES(y->dtype(), "CastKernelImpl", ([&] { -- GitLab