Skip to content

Commit 24f1c34

Browse files
chentong319tungld
andauthored
fix (#2586)
Signed-off-by: chentong319 <[email protected]> Signed-off-by: Tung D. Le <[email protected]> Co-authored-by: Tung D. Le <[email protected]>
1 parent 5b7fb90 commit 24f1c34

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Transform/ONNX/SimplifyShapeRelatedOps.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,10 @@ class PassThroughSlicePattern : public OpRewritePattern<ONNXSliceOp> {
321321
// step = 0 (invalid).
322322
return failure();
323323

324+
if (indices.size() == 0)
325+
// Empty result
326+
return failure();
327+
324328
// Replace SliceOp by ConcatOp of specific dimensions.
325329
SmallVector<Value, 4> dims;
326330
getDims(input, dims);

0 commit comments

Comments
 (0)