benchmark
361a7756 - Drop dynamo-specific type hints on Tensor in favor of type-ignores (#113720)

Commit
2 years ago
Drop dynamo-specific type hints on Tensor in favor of type-ignores (#113720) Summary: Per [this][1] discussion, plus some offline discussion. The summary: albanD considers the core PyTorch types like Tensor to be extremely brittle, and does not think the risk of adding these typed attributes to be worth it. eellison mentioned that we could use `WeakTensorKeyDictionary` instead. However, based on the sparse usage of these bonus attributes, I think that would be overkill. So I've opted to go with a few more type-ignore comments instead. [1]: https://github.com/pytorch/pytorch/pull/113610#discussion_r1392907367 X-link: https://github.com/pytorch/pytorch/pull/113720 Approved by: https://github.com/ezyang, https://github.com/albanD, https://github.com/eellison ghstack dependencies: #113534, #113610 Reviewed By: huydhn Differential Revision: D51383035 Pulled By: int3 fbshipit-source-id: 31f2dc3e56986728c5a7cb69df59dceac6e6551b
Author
Parents
Loading