diff --git a/mlir/include/mlir/Dialect/Tosa/IR/TosaTypesBase.td b/mlir/include/mlir/Dialect/Tosa/IR/TosaTypesBase.td --- a/mlir/include/mlir/Dialect/Tosa/IR/TosaTypesBase.td +++ b/mlir/include/mlir/Dialect/Tosa/IR/TosaTypesBase.td @@ -47,11 +47,22 @@ def Tosa_Int48 : I<48>; def Tosa_Int64 : I<64>; +def Tosa_SInt8 : SI<8>; +def Tosa_SInt16 : SI<16>; +def Tosa_SInt32 : SI<32>; +def Tosa_SInt48 : SI<48>; +def Tosa_SInt64 : SI<64>; + def Tosa_SignedInt : AnyTypeOf<[Tosa_Int8, Tosa_Int16, Tosa_Int32, Tosa_Int48, - Tosa_Int64]>; + Tosa_Int64, + Tosa_SInt8, + Tosa_SInt16, + Tosa_SInt32, + Tosa_SInt48, + Tosa_SInt64]>; def Tosa_Bool : I<1>; @@ -62,6 +73,8 @@ Tosa_SignedInt]>; def Tosa_Int32Or64 : AnyTypeOf<[Tosa_Int32, + Tosa_SInt32, + Tosa_SInt64, Tosa_Int64]>; //===----------------------------------------------------------------------===// diff --git a/mlir/test/Conversion/TosaToTensor/tosa-to-tensor.mlir b/mlir/test/Conversion/TosaToTensor/tosa-to-tensor.mlir --- a/mlir/test/Conversion/TosaToTensor/tosa-to-tensor.mlir +++ b/mlir/test/Conversion/TosaToTensor/tosa-to-tensor.mlir @@ -250,7 +250,7 @@ // CHECK-LABEL: @concat_axis_dyn // CHECK-SAME: (%[[ARG0:[0-9a-zA-Z_]*]]: // CHECK-SAME: %[[ARG1:[0-9a-zA-Z_]*]]: -func.func @concat_axis_dyn(%arg0: tensor, %arg1: tensor) -> () { +func.func @concat_axis_dyn(%arg0: tensor, %arg1: tensor) -> () { // CHECK: %[[AXIS:.+]] = arith.constant 0 // CHECK: %[[STRIDE:.+]] = arith.constant 1 // CHECK: %[[OFFSET:.+]] = arith.constant 0 : index @@ -259,12 +259,12 @@ // CHECK: %[[IDX0_2:.+]] = arith.constant 0 : index // CHECK: %[[DYN:.+]] = tensor.dim %[[ARG0]], %[[IDX0_2]] // CHECK: %[[IDX1:.+]] = arith.constant 1 : index - // CHECK: %[[INIT:.+]] = tensor.empty(%[[DYN]]) : tensor + // CHECK: %[[INIT:.+]] = tensor.empty(%[[DYN]]) : tensor // CHECK: %[[DYN1:.+]] = tensor.dim %[[ARG0]], %[[AXIS]] // CHECK: %[[INSERT0:.+]] = tensor.insert_slice %[[ARG0]] into %[[INIT]][0, 0] [%[[DYN1]], 3] [1, 1] // CHECK: %[[SUM:.+]] = arith.addi %[[OFFSET]], %[[DYN1]] // CHECK: %[[DYN2:.+]] = tensor.dim %[[ARG1]], %[[AXIS]] // CHECK: %[[INSERT1:.+]] = tensor.insert_slice %[[ARG1]] into %[[INSERT0]][%[[SUM]], 0] [%[[DYN2]], 3] [1, 1] - %0 = "tosa.concat"(%arg0, %arg1) { axis = 0 : i64} : (tensor, tensor) -> (tensor) + %0 = "tosa.concat"(%arg0, %arg1) { axis = 0 : i64} : (tensor, tensor) -> (tensor) return }