[NNC] Fix printing of integral doubles (#47799)
Summary:
When printing doubles, we don't do anything to distinguish intregal doubles (ie, 1 or 2) from ints. Added decoration of these doubles with `.0` if they are integral (i.e. DoubleImm(1) will print as `1.0`).
This is an issue specifically on Cuda where some intrinsics do not have type coercion. Added a test which covers this case (without the fix it tries to look up pow(double, int) which doesn't exist).
Fixes https://github.com/pytorch/pytorch/issues/47304
Pull Request resolved: https://github.com/pytorch/pytorch/pull/47799
Reviewed By: ZolotukhinM
Differential Revision: D24904185
Pulled By: nickgg
fbshipit-source-id: baa38726966c94ee50473cc046b9ded5c4e748f7