message: Use idiomatic grpc::Slice API that allows use of different backing buffer
diff: @@ -214,22 +214,13 @@ void EncodeTensorToByteBuffer(bool is_dead, const Tensor& val,
  if (tensor_data_is_large) {
  // (E) Encode tensor data, but by sharing backing store
  -
  - // TODO(vpai): Use the pure C++ ::grpc::Slice constructor that uses
  - // grpc_slice_new_with_user_data once TensorFlow pins a version of gRPC
  - // that includes https://github.com/grpc/grpc/pull/12065
  -
  const TensorBuffer* buf = DMAHelper::buffer(&val);
  buf->Ref();
  slices[1] = ::grpc::Slice(
  - grpc_slice_new_with_user_data(
  const_cast<void*>(static_cast<const void*>(tdata.data())),
  tdata.size(),
  - [](void* backing) {
  - static_cast<TensorBuffer*>(backing)->Unref();
  - },
  - const_cast<TensorBuffer*>(buf)),
  - ::grpc::Slice::STEAL_REF);
  + [](void* backing) { static_cast<TensorBuffer*>(backing)->Unref(); },
  + const_cast<TensorBuffer*>(buf));
  num_slices += 1;
  }
  size_t total_bytes = 0;
  