[PyTorch] Add a guard rail to TensorIterator::add_borrowed_{in,out}put (#58279)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/58279
See comment in source code.
ghstack-source-id: 129002040
Test Plan: CI
Reviewed By: wenleix
Differential Revision: D28428962
fbshipit-source-id: e011819e5579396f3ca2d87978c84965260adb1b