Added better tests for math ops and unified them (#21125)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/21125
ghimport-source-id: 2a576b563208ce3d83e6771643e20d24bc72af86
Differential Revision: D15563188
Pulled By: Chillee
fbshipit-source-id: 0e77471729f715063d6bee075d2fc65f8db8b6c3