Always return a new tensor from nn.functional.pad (#32350)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/31734
Pull Request resolved: https://github.com/pytorch/pytorch/pull/32350
Differential Revision: D19501845
Pulled By: ezyang
fbshipit-source-id: ea79496d23dc0016f3caa233c53d283b08f60371