Add some syntax sugar for when backends use the same function. (#40182)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/40182
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Test Plan: Imported from OSS
Differential Revision: D22187354
Pulled By: ezyang
fbshipit-source-id: 875a6a7837981b60830bd7b1c35d2a3802ed7dd7