Skip to content

Commit f8d9f1f

Browse files
Akshay Moditensorflower-gardener
Akshay Modi
authored andcommitted
Stop overriding destination device to nullptr (CPU:0) when its on CPU
PiperOrigin-RevId: 210604794
1 parent 40cd08d commit f8d9f1f

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

tensorflow/core/common_runtime/eager/tensor_handle.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ Status TensorHandle::CopyToDevice(EagerContext* ctx, tensorflow::Device* dstd,
193193
// has device type XLA_CPU, and the other CPU.
194194
const bool both_on_cpu = src_cpu && dst_cpu;
195195
if (is_same_device || both_on_cpu) {
196-
dstd = dst_cpu ? nullptr : dstd;
197196
*output = new tensorflow::TensorHandle(*src, dstd, dstd, ctx);
198197
return tensorflow::Status::OK();
199198
}

0 commit comments

Comments
 (0)