Move (most) generated return statements for TH functions out of the switch. (#38073)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/38073
Most of the generated return statements don't depend on the scalar type and it saves ~900 lines of generated code.
Test Plan: Imported from OSS
Differential Revision: D21476010
Pulled By: gchanan
fbshipit-source-id: 3fcc4db466d697c90abafb9da6c3f3644621810b