File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -4001,9 +4001,10 @@ OpFoldResult AtenSliceTensorOp::fold(FoldAdaptor adaptor) {
4001
4001
limit = limit < 0 ? limit + inType.getSizes ()[dimInt] : limit;
4002
4002
limit = limit < 0 ? -1 : limit;
4003
4003
limit = std::min (limit, inType.getSizes ()[dimInt]);
4004
- assert ((stride > 0 && begin < limit) ||
4005
- (stride < 0 && begin > limit) &&
4006
- " aten.slice.Tensor iteration args are statically invalid." );
4004
+ bool validIterArgs =
4005
+ (stride > 0 && begin < limit) || (stride < 0 && begin > limit);
4006
+ assert (validIterArgs &&
4007
+ " aten.slice.Tensor iteration args are statically invalid." );
4007
4008
4008
4009
int64_t inputRank = inType.getSizes ().size ();
4009
4010
llvm::SmallVector<int64_t > inputStrides (inputRank, 1 );
You can’t perform that action at this time.
0 commit comments