Skip to content

Commit

Permalink
Handle when concat axis is -1
Browse files Browse the repository at this point in the history
  • Loading branch information
panickal-xmos committed Aug 2, 2024
1 parent eaf9987 commit 4bd7b52
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xformer/Transforms/ReplaceConcat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ struct SplitConcatPattern : public OpRewritePattern<TFL::ConcatenationOp> {
auto outputType = concatOp.getOutput().getType().cast<RankedTensorType>();
Type elementType = outputType.getElementType();
ArrayRef<int64_t> outputShape = outputType.getShape();
const int axis = concatOp.getAxis();
int axis = concatOp.getAxis();
axis = -1 ? outputType.getRank() - 1 : axis;

int axisShape = 0;
for (int i = 0; i < CONCAT_OP_MAX_INPUTS; i++) {
Expand Down

0 comments on commit 4bd7b52

Please sign in to comment.