Skip to content

Commit 056dff2

Browse files
committed
reverting sigmoid verifier
1 parent 614b140 commit 056dff2

File tree

3 files changed

+0
-21
lines changed

3 files changed

+0
-21
lines changed

mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,8 +422,6 @@ def Tosa_SigmoidOp : Tosa_ElemWiseUnaryOp<"sigmoid"> {
422422
let results = (outs
423423
Tosa_Tensor:$output
424424
);
425-
426-
let hasVerifier = 1;
427425
}
428426

429427
//===----------------------------------------------------------------------===//

mlir/lib/Dialect/Tosa/IR/TosaOps.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1628,17 +1628,6 @@ LogicalResult WhileOp::inferReturnTypeComponents(
16281628
return success();
16291629
}
16301630

1631-
LogicalResult SigmoidOp::verify() {
1632-
auto inputType = llvm::cast<ShapedType>(getInput().getType());
1633-
auto outputType = llvm::cast<ShapedType>(getOutput().getType());
1634-
auto result = verifyCompatibleShapes(inputType, outputType);
1635-
if (result.failed()) {
1636-
return emitOpError() << "input type " << inputType << " and output type "
1637-
<< outputType << " are not compatible";
1638-
}
1639-
return success();
1640-
}
1641-
16421631
std::optional<SmallVector<int64_t, 4>> ApplyScaleOp::getShapeForUnroll() {
16431632
if (auto vt = llvm::dyn_cast<VectorType>(getType()))
16441633
return llvm::to_vector<4>(vt.getShape());

mlir/test/Dialect/Tosa/invalid.mlir

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -179,14 +179,6 @@ func.func @test_sigmoid_type_mismatch(%arg0: tensor<13x21x3xf32>) -> tensor<13x2
179179

180180
// -----
181181

182-
func.func @test_sigmoid(%arg0: tensor<13x21x3xf32>) -> tensor<13x21x4xf32> {
183-
// expected-error@+1 {{'tosa.sigmoid' op input type 'tensor<13x21x3xf32>' and output type 'tensor<13x21x4xf32>' are not compatible}}
184-
%0 = "tosa.sigmoid"(%arg0) : (tensor<13x21x3xf32>) -> tensor<13x21x4xf32>
185-
return %0 : tensor<13x21x4xf32>
186-
}
187-
188-
// -----
189-
190182
func.func @test_transpose_non_const(%arg0: tensor<13x21x3xf32>, %arg1: tensor<3xi32>) -> tensor<3x13x21xf32> {
191183
// expected-error@+1 {{'tosa.transpose' op perms of transpose is not constant}}
192184
%0 = "tosa.transpose"(%arg0, %arg1) : (tensor<13x21x3xf32>, tensor<3xi32>) -> tensor<3x13x21xf32>

0 commit comments

Comments
 (0)