Skip to content

Commit

Permalink
ack modulo and backwardness are incompatible
Browse files Browse the repository at this point in the history
  • Loading branch information
kali committed Sep 5, 2023
1 parent 39eae65 commit d4f767a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test-rt/suite-unit/src/downsample.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<bool>())
})
.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()
Expand Down

0 comments on commit d4f767a

Please sign in to comment.