Dont look at reduction output args when computing mem dependencies (#52170)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/52170
ghstack-source-id: 121813073
Test Plan: unit tests
Reviewed By: navahgar
Differential Revision: D26411735
fbshipit-source-id: 31c35af80d4f3e06df17ec65e4c91f604fc8745a