message: Remove PersistentTensor from dense_update_functor.cc
diff: @@ -74,7 +74,7 @@ struct DenseUpdate<CPUDevice, string, ASSIGN> {
  #define CPU_DENSE_COPY(T) \
  case DataTypeToEnum<T>::value: { \
  functor::DenseUpdate<CPUDevice, T, ASSIGN> copy_functor_; \
  - copy_functor_(context->eigen_device<CPUDevice>(), tensor->flat<T>(), \
  + copy_functor_(context->eigen_device<CPUDevice>(), tensor.flat<T>(), \
  from.flat<T>()); \
  break; \
  }
  @@ -83,13 +83,12 @@ struct DenseUpdate<CPUDevice, string, ASSIGN> {
  template <> \
  Status VariantCopyFn<DEVICE>(OpKernelContext * context, const Tensor& from, \
  Tensor* to) { \
  - PersistentTensor tmp; \
  - Tensor* tensor; \
  + Tensor tensor; \
  AllocatorAttributes attr; \
  attr.set_gpu_compatible(true); \
  attr.set_nic_compatible(true); \
  - TF_RETURN_IF_ERROR(context->allocate_persistent( \
  - from.dtype(), from.shape(), &tmp, &tensor, attr)); \
  + TF_RETURN_IF_ERROR( \
  + context->allocate_temp(from.dtype(), from.shape(), &tensor, attr)); \
  switch (from.dtype()) { \
  TYPE_CALLER(TYPE_DENSE_COPY); \
  default: \
  @@ -99,7 +98,7 @@ struct DenseUpdate<CPUDevice, string, ASSIGN> {
  DataTypeString(from.dtype()), \
  " using device: ", context->device()->name()); \
  } \
  - *to = *tensor; \
  + *to = tensor; \
  return Status::OK(); \
  }
  @@ -109,7 +108,7 @@ INSTANTIATE_GET_VARIANT_COPY_FN(CPUDevice, TF_CALL_ALL_TYPES, CPU_DENSE_COPY);
  #define GPU_DENSE_COPY(T) \
  case DataTypeToEnum<T>::value: { \
  functor::DenseUpdate<GPUDevice, T, ASSIGN> copy_functor_; \
  - copy_functor_(context->eigen_device<GPUDevice>(), tensor->flat<T>(), \
  + copy_functor_(context->eigen_device<GPUDevice>(), tensor.flat<T>(), \
  from.flat<T>()); \
  break; \
  }
  