Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions mlir/lib/Dialect/Tosa/Transforms/TosaValidation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,10 @@ LogicalResult TosaValidation::applyLevelCheck(Operation *op) {
return success();
}

// check rank and sizes early so later checks can assume shaped operands
if (!levelCheckRanksAndSizes(op))
return failure();

// additional level checks from spec 0.70
if (!levelCheckPool<tosa::AvgPool2dOp>(op) ||
!levelCheckConv<tosa::Conv2DOp>(op) ||
Expand All @@ -770,10 +774,6 @@ LogicalResult TosaValidation::applyLevelCheck(Operation *op) {
return failure();
}

if (!levelCheckRanksAndSizes(op)) {
return failure();
}

// level check MAX_TENSOR_LIST_SIZE
if (!levelCheckListSize(op)) {
return failure();
Expand Down
Loading