Skip to content

Commit

Permalink
remove cuda sync in ext_tensor copy_to (PaddlePaddle#35802)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenwhql authored and AnnaTrainingG committed Sep 29, 2021
1 parent 97404b8 commit b8bb16f
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions paddle/fluid/extension/src/ext_tensor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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"
Expand Down

0 comments on commit b8bb16f

Please sign in to comment.