Add non-allocating helper function for torch.linalg.qr (#56254)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/56254
Test Plan: Imported from OSS
Reviewed By: ngimel
Differential Revision: D27960151
Pulled By: mruberry
fbshipit-source-id: 4067afed0dcca3f32d0fa153e50a268a850817b2