Unverified Commit c5914452 authored by Francisco Massa's avatar Francisco Massa Committed by GitHub
Browse files

Remove float testing for _max_value (#3103)

It's not used currently and can lead to exceptions such as runtime error: 5.7896e+76 is outside the range of representable values of type 'float'
parent e2e323cc
......@@ -557,8 +557,10 @@ class Tester(unittest.TestCase):
for dtype in int_dtypes():
self.assertEqual(F_t._max_value(dtype), torch.iinfo(dtype).max)
for dtype in float_dtypes():
self.assertGreater(F_t._max_value(dtype), torch.finfo(dtype).max)
# remove float testing as it can lead to errors such as
# runtime error: 5.7896e+76 is outside the range of representable values of type 'float'
# for dtype in float_dtypes():
# self.assertGreater(F_t._max_value(dtype), torch.finfo(dtype).max)
def test_convert_image_dtype_float_to_float(self):
for input_dtype, output_dtypes in cycle_over(float_dtypes()):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment