Fix saved tensor hooks to propogate errors back to python as-is (#94456)
Mitigates the effect of https://github.com/pytorch/pytorch/issues/34172 for saved tensor hooks
BC Breaking message:
- Exceptions raised inside the pack and unpack hooks are no longer erroneously converted to RuntimeErrors. You should update your code to handle the original type of exception raised.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/94456
Approved by: https://github.com/albanD