pytorch
84843759 - Delete functorch's monkeypatching (#85430)

Commit
3 years ago
Delete functorch's monkeypatching (#85430) By upstreaming functorch's tensor printing logic into PyTorch. There's no way of creating a custom print function for a TensorImpl subclass (as opposed to a torch_dispatch or torch_function tensor subclass, which can just override repr()) right now, so we need to directly interpose inside regular Tensor printing in PyTorch. Monkey patching is bad; users do not expect `import blah` to change something about another library. Fixes https://github.com/pytorch/functorch/issues/900 Test Plan: - existing tests Pull Request resolved: https://github.com/pytorch/pytorch/pull/85430 Approved by: https://github.com/ezyang
Author
Committer
Parents
Loading