Skip to content

Commit

Permalink
[mlir][tosa] Updates tosa.logical_not to use the SameOperandsAndResul…
Browse files Browse the repository at this point in the history
…tType trait

Reviewed By: jpienaar

Differential Revision: https://reviews.llvm.org/D131496
  • Loading branch information
not-jenni authored and jpienaar committed Aug 11, 2022
1 parent d299c03 commit 7ff0ca1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
2 changes: 1 addition & 1 deletion mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,7 @@ def Tosa_LogOp : Tosa_Op<"log", [
def Tosa_LogicalNotOp : Tosa_Op<"logical_not", [
DeclareOpInterfaceMethods<InferShapedTypeOpInterface,
["inferReturnTypeComponents"]>,
NoSideEffect]> {
NoSideEffect, SameOperandsAndResultType]> {
let summary = "Returns the truth value of NOT x element-wise.";

let description = [{
Expand Down
9 changes: 0 additions & 9 deletions mlir/test/Dialect/Tosa/tosa-infer-shapes.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,6 @@ func.func @test_unary_i32(%arg0 : tensor<4xi32>) -> () {

// -----

// CHECK-LABEL: @test_unary_i1
func.func @test_unary_i1(%arg0 : tensor<4xi1>) -> () {
// CHECK: "tosa.logical_not"(%arg0) : (tensor<4xi1>) -> tensor<4xi1>
%0 = "tosa.logical_not"(%arg0) : (tensor<4xi1>) -> tensor<*xi1>
return
}

// -----

// CHECK-LABEL: @test_binary_scalar_f32
func.func @test_binary_scalar_f32(%arg0 : tensor<4xf32>, %arg1 : tensor<f32>) -> () {
// CHECK: "tosa.add"(%arg0, %arg1) : (tensor<4xf32>, tensor<f32>) -> tensor<4xf32>
Expand Down

0 comments on commit 7ff0ca1

Please sign in to comment.