message: [tf.data]: Update TensorSlice to not hold the lock during the tensor copy.
  Some input pipelines are so fast that they can become bottlenecked on the memory copy within the TensorSlice dataset. This change updates the implementation of TensorSliceDataset to release the lock before performing the tensor copy.
diff: @@ -129,8 +129,17 @@ class TensorSliceDatasetOp : public DatasetOpKernel {
  Status GetNextInternal(IteratorContext* ctx,
  std::vector<Tensor>* out_tensors,
  bool* end_of_sequence) override {
  + int64 index = 0;
  + {
  mutex_lock l(mu_);
  if (i_ < n_) {
  + index = i_;
  + ++i_;
  + } else {
  + *end_of_sequence = true;
  + return Status::OK();
  + }
  + }
  out_tensors->clear();
  out_tensors->reserve(dataset()->tensors_.size());
  for (int i = 0; i < dataset()->tensors_.size(); ++i) {
  @@ -139,13 +148,9 @@ class TensorSliceDatasetOp : public DatasetOpKernel {
  ctx->allocator({}), t.dtype(),
  TensorShape(dataset()->shapes_[i].dim_sizes()));
  TF_RETURN_IF_ERROR(
  - batch_util::CopySliceToElement(t, &out_tensors->back(), i_));
  + batch_util::CopySliceToElement(t, &out_tensors->back(), index));
  }
  - ++i_;
  *end_of_sequence = false;
  - } else {
  - *end_of_sequence = true;
  - }
  return Status::OK();
  }
  