From d43f797acc7429a6932a1b74e169b5c147b5e744 Mon Sep 17 00:00:00 2001 From: Chen Weihang Date: Fri, 17 Sep 2021 14:26:08 +0800 Subject: [PATCH] remove cuda sync in ext_tensor copy_to (#35802) --- paddle/fluid/extension/src/ext_tensor.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/paddle/fluid/extension/src/ext_tensor.cc b/paddle/fluid/extension/src/ext_tensor.cc index 317fb7b227..a0a9872c4c 100644 --- a/paddle/fluid/extension/src/ext_tensor.cc +++ b/paddle/fluid/extension/src/ext_tensor.cc @@ -90,7 +90,6 @@ void DeviceCopy(T *src, T *dst, PlaceType src_plc, PlaceType dst_plc, PADDLE_THROW(platform::errors::Unavailable( "Only GPU related Copy can reach this func.")); } - cudaStreamSynchronize(dev_ctx->stream()); #elif defined(PADDLE_WITH_HIP) platform::DeviceContextPool &pool = platform::DeviceContextPool::Instance(); int device_num = paddle::platform::GetCurrentDeviceId(); @@ -110,7 +109,6 @@ void DeviceCopy(T *src, T *dst, PlaceType src_plc, PlaceType dst_plc, PADDLE_THROW(platform::errors::Unavailable( "Only GPU related Copy can reach this func.")); } - hipStreamSynchronize(dev_ctx->stream()); #else PADDLE_THROW(platform::errors::Unavailable( "This function can only be used if compiled with" -- GitLab