Skip to content

Commit

Permalink
i32::max means end too
Browse files Browse the repository at this point in the history
  • Loading branch information
kali committed Sep 21, 2023
1 parent 3aa4747 commit c11c74f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/ops/array/strided_slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ impl StridedSlice {
None
} else if end.datum_type() == i64::datum_type() {
let end = *end.as_slice::<i64>()?.get(ix).unwrap();
if end == std::i64::MAX || end == std::i64::MIN || end == std::i64::MIN + 1 {
if end == std::i64::MAX || end == std::i64::MIN || end == std::i64::MIN + 1 || end == std::i32::MAX as _ {
None
} else {
Some(end.to_dim())
Expand Down
1 change: 1 addition & 0 deletions hir/src/ops/array/strided_slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ impl InferenceRulesOp for StridedSlice {
for (ix, axis) in axes.into_iter().enumerate() {
let preped =
self.prepare_one_dim(ix, &input_shape[axis], begin, end, &strides)?;
dbg!(&preped);
output_shape[axis] = preped.soft_len()?;
if preped.shrink {
shrink.push(axis);
Expand Down

0 comments on commit c11c74f

Please sign in to comment.