fixing index clamping for upsample nearest kernel backward (#51240)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/51036
Pull Request resolved: https://github.com/pytorch/pytorch/pull/51240
Reviewed By: ailzhang
Differential Revision: D26139221
Pulled By: ngimel
fbshipit-source-id: 0591ac6d1f988b54c1b1ee50d34fb7c2a3f97c4e