Fix nvcc math functions for MSVC 2019 (#31704)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/31108.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/31704
Differential Revision: D19256110
Pulled By: mingbowan
fbshipit-source-id: a4aba2830aba002497f70a75ef995e5e7de08393