pytorch
f2fd91cc - [PyTorch] Add & document borrow_from_optional_tensor (#56647)

Commit
3 years ago
[PyTorch] Add & document borrow_from_optional_tensor (#56647) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/56647 This should be more efficient than the old hacky wrapper for optional Tensor pattern. Despite appearances, the old pattern did a reference count bump for non-empty optionals. Following diff will contain an automated change to migrate callsites. ghstack-source-id: 127112926 Test Plan: Review, CI on following change Reviewed By: bhosmer Differential Revision: D27925838 fbshipit-source-id: 2c6082c5930b1e71b853a75c52873088dbc48167
Author
Parents
Loading