pytorch
056b147e - clean torch_function handling in serialization (#62744)

Commit
3 years ago
clean torch_function handling in serialization (#62744) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/62744 The `Tensor._reduce_ex_internal` function can only be called via the `Tensor.__reduce_ex__` function. And that second function already properly handles the `__torch_function__` overwrites. So no need to handle them again in `Tensor._reduce_ex_internal`. This PR also updates `Tensor.__reduce_ex__` to use the specialized unary API for `__torch_function__` that makes it nicer to read. Test Plan: Imported from OSS Reviewed By: H-Huang Differential Revision: D30113113 Pulled By: albanD fbshipit-source-id: c94f5d2597ee3afe799d9de991f75615c3c172d6
Author
Parents
Loading