Gradgradcheck to runs successfully with unrelated inputs (#58049)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/57649
Pull Request resolved: https://github.com/pytorch/pytorch/pull/58049
Reviewed By: agolynski
Differential Revision: D28390033
Pulled By: albanD
fbshipit-source-id: a0809b918321f3ea6fc59bfbec1f37e566d3611d