Skip to content

Commit 6ae60de

Browse files
ezyangdlibenzi
authored andcommitted
bugfixes
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
1 parent c670f90 commit 6ae60de

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

torch_xla/csrc/aten_xla_type.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,7 @@ at::Tensor& AtenXlaType::copy_(at::Tensor& self, const at::Tensor& src,
871871

872872
if (!src_tensor) {
873873
XLA_CHECK(self_tensor);
874-
self_tensor.SetTensor(CopyTensor(src, self_tensor->scalar_type()));
874+
self_tensor->SetTensor(CopyTensor(src, self.scalar_type()));
875875
} else if (!self_tensor) {
876876
// TODO: Is self_tensor good enough? I don't think so... therefore
877877
// the hack below:
@@ -882,7 +882,7 @@ at::Tensor& AtenXlaType::copy_(at::Tensor& self, const at::Tensor& src,
882882
const_cast<at::Tensor&>(self).unsafeGetTensorImpl()->shallow_copy_from(
883883
t.getIntrusivePtr());
884884
} else {
885-
XLATensor::copy_(self_tensor, *src_tensor);
885+
XLATensor::copy_(*self_tensor, *src_tensor);
886886
}
887887
return self;
888888
}

0 commit comments

Comments
 (0)