Skip to content

Commit

Permalink
Fix crash when attempting to copy string tensor from CPU to DML (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
PatriceVignola authored Dec 16, 2020
1 parent c77b197 commit 33d39bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tensorflow/core/common_runtime/eager/tensor_handle.cc
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,8 @@ Status TensorHandle::CopyToDevice(EagerContext* ctx, tensorflow::Device* dstd,
*output = *src;
return Status::OK();
}
if (!dst_device_context && (src->dtype() != tensorflow::DT_VARIANT &&
!tensorflow::DataTypeCanUseMemcpy(src->dtype()))) {
if (dst_device_context && (src->dtype() != tensorflow::DT_VARIANT &&
!tensorflow::DataTypeCanUseMemcpy(src->dtype()))) {
return tensorflow::errors::InvalidArgument(
"Can't copy Tensor with type ",
tensorflow::DataTypeString(src->dtype()), " to device ", dstd->name(),
Expand Down

0 comments on commit 33d39bf

Please sign in to comment.