Port existing zero_dim_dispatch optimizations from codegen and remove codegen capability. (#37615)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37615
We probably missed a lot of these when we ported things from TH, but it's also probably not a huge deal. There is only one left with fmod.
Test Plan: Imported from OSS
Reviewed By: bhosmer
Differential Revision: D21338030
Pulled By: gchanan
fbshipit-source-id: c133b4e37df87a53797939e9f757cea9446834e8