workaround nvcc host function bug (#37867)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37867
this is to work around internal issue we are hitting with nvcc in ovrsource.
It does not seem to overload to the correct device version of `isinf` and `isnan` without this fudging of the code.
Test Plan:
CI green,
internal builds pass
Reviewed By: malfet
Differential Revision: D21408263
fbshipit-source-id: 1ff44e088b5c885d729cc95f00cf8fa07e525f6d