Skip to content

Commit

Permalink
Add aten::lift_fresh to the exception list that converts input to tor…
Browse files Browse the repository at this point in the history
…ch tensor (#8360)
  • Loading branch information
barney-s authored Nov 6, 2024
1 parent 77abab2 commit 6454b42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion experimental/torch_xla2/torch_xla2/tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ def dispatch(self, func, types, args, kwargs):
kwargs = kwargs or {}
if func in TENSOR_CONSTRUCTORS:
return self._handle_tensor_constructor(func, args, kwargs)
if func in (torch.Tensor.to, torch.ops.aten._to_copy, torch.ops.aten._to_copy.default):
if func in (torch.Tensor.to, torch.ops.aten.lift_fresh.default ,torch.ops.aten._to_copy, torch.ops.aten._to_copy.default):
return self._torch_Tensor_to(args, kwargs)

# If the func doesn't act on XLATensor2, and is not a tensor constructor,
Expand Down

0 comments on commit 6454b42

Please sign in to comment.