Enable output allocation cache (#86100)
Cherry-picked from devel branch: https://github.com/csarofeen/pytorch/pull/2010
turns on accidentally disabled output allocation cache [#2002](https://github.com/csarofeen/pytorch/issues/2002)
Updated check for safety regarding allocation cache by iterating all IterDomain on outputs and enables cache re-use only when no extent value is a consumer of fusion inputs (output sizes is not dependent on scalar inputs).
Pull Request resolved: https://github.com/pytorch/pytorch/pull/86100
Approved by: https://github.com/csarofeen