[PyTorch] Try using ExclusivelyOwned in LinearAlgebra (#59420)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/59420
This is a sample of how we might use ExclusivelyOwned on an opt-in basis.
ghstack-source-id: 133089540
Test Plan:
1) CI to run regression tests
2) Spot-checked assembly for linalg_det_out. Rather than calling the intrusive_ptr dtor, we get the ExclusivelyOwned dtor inline. In particular, we do not get any atomic refcount decrement instructions emitted.
3) TODO: some kind of perf profiling; advice welcome
Reviewed By: ezyang
Differential Revision: D28885313
fbshipit-source-id: ae4b39ed738c41d0c4a4509a5199c040ba9aa63a