We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6cab740 commit 8dcd0b2Copy full SHA for 8dcd0b2
lib/Conversion/TorchToTosa/TorchToTosa.cpp
@@ -3171,8 +3171,10 @@ LogicalResult ConvertAtenOp<AtenSliceTensorOp>::matchAndRewrite(
3171
int64_t end;
3172
if (!matchPattern(op.getEnd(), m_TorchConstantInt(&end)))
3173
return rewriter.notifyMatchFailure(op, "end must be a Scalar constant");
3174
+ // support for end < 0
3175
+ end = toPositiveDim(end, selfType.getShape()[dim]);
3176
- // FIXME: add support for start/end < 0 and end < start
3177
+ // FIXME: add support for start < 0 and end < start
3178
if (end < start)
3179
return rewriter.notifyMatchFailure(op,
3180
"Currently unsupported: end < start");
0 commit comments