We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f8b6b18 commit f8aa9bdCopy full SHA for f8aa9bd
tests/scalar/test_loop.py
@@ -213,10 +213,16 @@ def test_inner_composite(mode):
213
assert y16.type.dtype == "float16"
214
215
fn16 = function([n_steps, x16], y16, mode=mode)
216
- out16 = fn16(n_steps=9, x16=np.array(4.73, dtype="float16"))
217
- assert out16.dtype == "float16"
+ out16 = fn16(n_steps=3, x16=np.array(4.73, dtype="float16"))
+ np.testing.assert_allclose(
218
+ out16,
219
+ 4.73 + 3,
220
+ rtol=1e-3,
221
+ )
222
+ out16overflow = fn16(n_steps=9, x16=np.array(4.73, dtype="float16"))
223
+ assert out16overflow.dtype == "float16"
224
# with this dtype overflow happens
- assert np.isnan(out16)
225
+ assert np.isnan(out16overflow)
226
227
228
@mode
0 commit comments