The torch.cc file copies the definition of THPVariable which has changed. It's now just at::Tensor cdata instead of at::MaybeOwned<at::Tensor> cdata.
|
struct THPVariable { |
|
PyObject_HEAD |
|
at::MaybeOwned<at::Tensor> cdata; |
|
}; |
https://github.com/pytorch/pytorch/blob/84a7a34e5fb22c89530791136dc5f3023d2f709b/torch/csrc/autograd/python_variable.h#L17-L28
The
torch.ccfile copies the definition of THPVariable which has changed. It's now justat::Tensor cdatainstead ofat::MaybeOwned<at::Tensor> cdata.fairseq2/native/python/src/fairseq2n/bindings/type_casters/torch.cc
Lines 18 to 21 in fb2a3f3
https://github.com/pytorch/pytorch/blob/84a7a34e5fb22c89530791136dc5f3023d2f709b/torch/csrc/autograd/python_variable.h#L17-L28