move logic to skip a redispatch directly inside of resize_output (#55162)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/55162
Test Plan: Imported from OSS
Reviewed By: ezyang
Differential Revision: D27506253
Pulled By: bdhirsh
fbshipit-source-id: 02fddb1926de49cd8c915c549eb99d92e58e75e1