fix range of results for pairwise operations (#40728)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/40728
there are two reasons the test is failing:
1) div by 0
2) result is bigger than fp16 max
for 1) make the divisor some safe number like 1e-3
2) when a combination of random numbers results in their resulting value bigger than 65e3, clip
multiplication is fine because range of random numbers is 0,100 -> result is 0->10000
Test Plan: ran tes_div test
Reviewed By: hl475
Differential Revision: D22295934
fbshipit-source-id: 173f3f2187137d6c1c4d4a505411a27f1c059f1a