Skip to content

Commit d0df49c

Browse files
committed
Mute expected float32 overflow warning in batch cumprod test
On non-fp64 devices test_cumprod_axis_batch_kernels runs in float32, where the cumulative product overflows to inf along long axes (dpnp and the NumPy reference alike, so the inf==inf comparison still holds). Add a message-scoped filterwarnings mark so the expected NumPy overflow RuntimeWarning is no longer reported by the infra-warnings tracker.
1 parent 1da7fd1 commit d0df49c

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎dpnp/tests/third_party/cupy/math_tests/test_sumprod.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -967,6 +967,7 @@ def test_cumprod_numpy_array(self, dtype):
967967
return cupy.cumprod(a_numpy)
968968

969969
@pytest.mark.parametrize("shape, axis", _BATCH_SCAN_AXIS_CASES)
970+
@pytest.mark.filterwarnings("ignore:overflow encountered:RuntimeWarning")
970971
@testing.numpy_cupy_allclose(
971972
rtol=1e-5,
972973
atol=1e-6,

0 commit comments

Comments
 (0)