Skip to content

Commit bf4dc96

Browse files
authored
[mlir][linalg] Clean up op verifiers without custom checks(NFC) (#168712)
This PR removes op verifiers that do not implement any custom verification logic.
1 parent 1d73b68 commit bf4dc96

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,6 @@ def GenericOp : LinalgStructuredBase_Op<"generic", [
222222
let hasCanonicalizer = 1;
223223
let hasCustomAssemblyFormat = 1;
224224
let hasFolder = 1;
225-
let hasVerifier = 1;
226225
}
227226

228227

@@ -620,7 +619,6 @@ def ElementwiseOp : LinalgStructuredBase_Op<"elementwise", [
620619

621620
let hasCustomAssemblyFormat = 1;
622621
let hasFolder = 1;
623-
let hasVerifier = 1;
624622

625623
let extraClassDeclaration = structuredOpsBaseDecls # [{
626624
/// Get the arity enum corresponding to the kind of op, e.g. if arg is

mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1338,8 +1338,6 @@ Speculation::Speculatability GenericOp::getSpeculatability() {
13381338
return getGenericSpeculatabilityImpl(cast<LinalgOp>(getOperation()));
13391339
}
13401340

1341-
LogicalResult GenericOp::verify() { return success(); }
1342-
13431341
namespace {
13441342

13451343
/// Remove linalg operations that are just copying the values from inputs to
@@ -4885,13 +4883,6 @@ void ElementwiseOp::print(OpAsmPrinter &p) {
48854883
elidedAttrs);
48864884
}
48874885

4888-
LogicalResult ElementwiseOp::verify() {
4889-
// All necessary checks are done either by
4890-
// - EnumAttr (e.g. unknown operation kind)
4891-
// - verifyStructuredOpInterface (incorrect map, sizes).
4892-
return success();
4893-
}
4894-
48954886
/// Implements the block region builder for the ElementwiseOp. This is called by
48964887
/// 'fillStructuredOpRegion'.
48974888
void ElementwiseOp::regionBuilder(

0 commit comments

Comments
 (0)