From d4f767a0282ba45c22e0be76c95c166cad9cccf5 Mon Sep 17 00:00:00 2001 From: Mathieu Poumeyrol Date: Tue, 5 Sep 2023 13:22:28 +0200 Subject: [PATCH] ack modulo and backwardness are incompatible --- test-rt/suite-unit/src/downsample.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test-rt/suite-unit/src/downsample.rs b/test-rt/suite-unit/src/downsample.rs index 83167f9682..0cdb95c0a4 100644 --- a/test-rt/suite-unit/src/downsample.rs +++ b/test-rt/suite-unit/src/downsample.rs @@ -21,9 +21,9 @@ impl Arbitrary for DownsampleProblem { (1..4usize).prop_flat_map(|stride| (Just(stride as isize), 0..stride)); (Just(input_shape), 0..rank, stride_and_modulo, any::()) }) - .prop_map(|(input_shape, axis, (stride, modulo), dir)| { - let modulo = modulo.min(input_shape[axis] - 1); - let stride = if dir { -stride } else { stride }; + .prop_map(|(input_shape, axis, (stride, modulo), backward)| { + let modulo = if backward { 0 } else { modulo.min(input_shape[axis] - 1) }; + let stride = if backward { -stride } else { stride }; DownsampleProblem { input_shape, op: Downsample { axis, stride, modulo } } }) .boxed()