See https://github.com/pytorch/pytorch/pull/55875 . I think https://github.com/pytorch/xla/blob/7a067f7de7355195c2a050c65b55b18a48da4405/torch_xla/csrc/aten_xla_type.cpp#L639 just needs to take & return `const Tensor&` after the patch, similar to the resize change.