message: SynchronousMemcpy changed to SynchronousMemcpyD2H and SynchronousMemcpyH2D
diff: @@ -44,7 +44,8 @@ bool CheckMask(se::StreamExecutor* exec, void* ptr, int64* mask) {
  se::DeviceMemory<int64> gpu_ptr{se::DeviceMemoryBase{ptr, MASK_BYTES}};
  int64 tmp[MASK_WORDS];
  - if (!exec->SynchronousMemcpy(&tmp, gpu_ptr, MASK_BYTES)) {
  + Status result = exec->SynchronousMemcpyD2H(gpu_ptr, MASK_BYTES, tmp);
  + if (!result.ok()) {
  LOG(FATAL) << "Could not copy debug mask";
  }
  @@ -63,7 +64,8 @@ bool CheckMask(se::StreamExecutor* exec, void* ptr, int64* mask) {
  void InitMask(se::StreamExecutor* exec, void* ptr, int64* mask) {
  se::DeviceMemory<int64> gpu_ptr{se::DeviceMemoryBase{ptr, MASK_BYTES}};
  - if (!exec->SynchronousMemcpy(&gpu_ptr, mask, MASK_BYTES)) {
  + Status result = exec->SynchronousMemcpyH2D(mask, MASK_BYTES, &gpu_ptr);
  + if (!result.ok()) {
  LOG(FATAL) << "Could not copy debug mask";
  }
  }
  @@ -171,7 +173,9 @@ void* GPUNanResetAllocator::AllocateRaw(size_t alignment, size_t num_bytes) {
  se::DeviceMemory<float> nan_ptr{
  se::DeviceMemoryBase{static_cast<float*>(allocated_ptr), req_size}};
  - if (!stream_exec_->SynchronousMemcpy(&nan_ptr, &nans[0], req_size)) {
  + Status result = stream_exec_->SynchronousMemcpyH2D(&nans[0], req_size,
  + &nan_ptr);
  + if (!result.ok()) {
  LOG(ERROR) << "Could not initialize to NaNs";
  }
  @@ -185,7 +189,9 @@ void GPUNanResetAllocator::DeallocateRaw(void* ptr) {
  std::nanf(""));
  se::DeviceMemory<float> nan_ptr{
  se::DeviceMemoryBase{static_cast<float*>(ptr), req_size}};
  - if (!stream_exec_->SynchronousMemcpy(&nan_ptr, &nans[0], req_size)) {
  + Status result = stream_exec_->SynchronousMemcpyH2D(&nans[0], req_size,
  + &nan_ptr);
  + if (!result.ok()) {
  LOG(ERROR) << "Could not initialize to NaNs";
  }
  }
  