From d53d8fdcc24bac9636a5d7459b3e323cba41011d Mon Sep 17 00:00:00 2001 From: engineer1109 <1292846099@qq.com> Date: Thu, 18 May 2023 15:11:25 +0800 Subject: [PATCH] remove CopyWithContext limitation (#53771) --- paddle/phi/kernels/funcs/strided_memcpy.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/paddle/phi/kernels/funcs/strided_memcpy.h b/paddle/phi/kernels/funcs/strided_memcpy.h index 19a542bd2b5..de38e40d317 100644 --- a/paddle/phi/kernels/funcs/strided_memcpy.h +++ b/paddle/phi/kernels/funcs/strided_memcpy.h @@ -56,7 +56,8 @@ inline void CopyWithContext(const Context& ctx, const Place& src_place, const void* src, size_t num) { -#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) +#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || \ + defined(PADDLE_WITH_CUSTOM_DEVICE) memory_utils::Copy(dst_place, dst, src_place, src, num, ctx.stream()); #else PADDLE_THROW( -- GitLab