Fix ScriptMethod dispatch on __torch_function__ (#56103)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/56103
Test Plan: Imported from OSS
Reviewed By: ezyang
Differential Revision: D27784142
Pulled By: jamesr66a
fbshipit-source-id: 555dcb7c3a98b8fb9e9ca9b499cafad54e819aa7