Add no-input-grad-needed cases to test_grid_sample (#66071)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/66071
Test Plan: Imported from OSS
Reviewed By: dagitses
Differential Revision: D31431801
Pulled By: albanD
fbshipit-source-id: 57a94ed9e97e402aa8193d69355e57b6309c64f7