Add optional tensor arguments to (#63967)
authorSamantha Andow <samdow@fb.com>
Tue, 31 Aug 2021 02:15:16 +0000 (19:15 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Tue, 31 Aug 2021 02:21:26 +0000 (19:21 -0700)
commitc7c711bfb88fcb0ef573125a5a8655c49156055b
tree701929553ffec5e43365626182c98c1aacc2357a
parentcb7cf823b30dcf623d1bceb76c6e16a899f5dc46
Add optional tensor arguments to (#63967)

Summary:
Fixes https://github.com/pytorch/pytorch/issues/63435

Adds optional tensor arguments to check handling torch function checks. The only one I didn't do this for in the functional file was `multi_head_attention_forward` since that already took care of some optional tensor arguments but not others so it seemed like arguments were specifically chosen

Pull Request resolved: https://github.com/pytorch/pytorch/pull/63967

Reviewed By: albanD

Differential Revision: D30640441

Pulled By: ezyang

fbshipit-source-id: 5ef9554d2fb6c14779f8f45542ab435fb49e5d0f
torch/nn/functional.py