update requires_gard on loop inputs correctly (master) (#40926) (#41014)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/40926
Reviewed By: eellison
Differential Revision: D22359471
Pulled By: Krovatkin
fbshipit-source-id: 823e87674e2d2917f075255ec926e0485972f4e2