Skip to content

Commit

Permalink
Handle Tensor.__deepcopy__ via clone(), on IPU
Browse files Browse the repository at this point in the history
  • Loading branch information
charlie-wt authored and pytorchmergebot committed Nov 23, 2022
1 parent 7594e04 commit 8e26012
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion torch/_tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ def __deepcopy__(self, memo):
# Update the test in test_serialization if you remove 'meta' from here
if (
self.is_sparse
or self.device.type in ["lazy", "xla", "mps", "ort", "meta", "hpu"]
or self.device.type
in ["lazy", "xla", "mps", "ort", "meta", "hpu", "ipu"]
or (
not torch._C._has_storage(self)
and self.device.type == "privateuseone"
Expand Down

0 comments on commit 8e26012

Please sign in to comment.