Skip to content

Instantly share code, notes, and snippets.

@byronyi
Created July 9, 2017 11:45
Show Gist options
  • Save byronyi/e5f96a4b74eceaecab5a630e6c7f355c to your computer and use it in GitHub Desktop.
Save byronyi/e5f96a4b74eceaecab5a630e6c7f355c to your computer and use it in GitHub Desktop.
diff --git a/tensorflow/core/distributed_runtime/rpc/rdma.cc b/tensorflow/core/distributed_runtime/rpc/rdma.cc
index 145b24396..0e73c31b1 100644
--- a/tensorflow/core/distributed_runtime/rpc/rdma.cc
+++ b/tensorflow/core/distributed_runtime/rpc/rdma.cc
@@ -310,34 +310,9 @@ class RdmaReadClient : public RdmaClient {
}
#endif
- // TODO: Remove code used for debugging purposes only
- string tensor_debug_string;
- if (dst_device->tensorflow_gpu_device_info() && (!on_host)) {
-#if GOOGLE_CUDA
- tensor_debug_string = GPUUtil::MemoryDebugString(dst_device, tensor);
-#else
- return errors::Internal("No GPU device in process");
-#endif
- } else {
- tensor_debug_string = tensor->DebugString();
- }
-
- uint64_t checksum = 0;
-#if GOOGLE_CUDA
- if (dst_device->tensorflow_gpu_device_info() && (!on_host)) {
- checksum = GPUUtil::Checksum(dst_device, dst_device_context, *tensor);
- } else {
- checksum = GPUUtil::Checksum(*tensor);
- }
- CHECK(checksum == remote_mr.checksum())
- << "Checksum mismatch for "
- << tensor_debug_string;
-#endif
-
uint64_t end = Env::Default()->NowMicros();
VLOG(2) << "RDMA from remote memory region " << remote_mr.rkey()
- << " to " << tensor_debug_string
<< " of size " << buffer->size()
<< " with tensor key " << remote_mr.tensor_key()
<< " took " << (end - start) << " micros";
@@ -562,23 +537,12 @@ class RdmaReadServer : public RdmaServer {
tensor_buffers_.insert({tensor_key, buffer});
}
- // TODO: Remove code used for debugging purposes only
- uint64_t checksum = 0;
-#if GOOGLE_CUDA
- if (src_device->tensorflow_gpu_device_info() && (!on_host)) {
- checksum = GPUUtil::Checksum(src_device, src_device_context, tensor);
- } else {
- checksum = GPUUtil::Checksum(tensor);
- }
-#endif
-
RemoteMemoryRegion remote_mr;
remote_mr.set_host(host_);
remote_mr.set_port(port_);
remote_mr.set_addr(reinterpret_cast<uint64_t>(addr));
remote_mr.set_rkey(mr->rkey);
remote_mr.set_tensor_key(tensor_key);
- remote_mr.set_checksum(checksum);
mutable_transport_options->PackFrom(remote_mr);
return Status::OK();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment