Skip to content

Commit 33d39bf

Browse files
Fix crash when attempting to copy string tensor from CPU to DML (#126)
1 parent c77b197 commit 33d39bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tensorflow/core/common_runtime/eager/tensor_handle.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -495,8 +495,8 @@ Status TensorHandle::CopyToDevice(EagerContext* ctx, tensorflow::Device* dstd,
495495
*output = *src;
496496
return Status::OK();
497497
}
498-
if (!dst_device_context && (src->dtype() != tensorflow::DT_VARIANT &&
499-
!tensorflow::DataTypeCanUseMemcpy(src->dtype()))) {
498+
if (dst_device_context && (src->dtype() != tensorflow::DT_VARIANT &&
499+
!tensorflow::DataTypeCanUseMemcpy(src->dtype()))) {
500500
return tensorflow::errors::InvalidArgument(
501501
"Can't copy Tensor with type ",
502502
tensorflow::DataTypeString(src->dtype()), " to device ", dstd->name(),

0 commit comments

Comments
 (0)