Skip to content

Commit 66c3e5d

Browse files
committed
Clean up test cases
* remove duplicate test * remove unused input parameter * use a list of strings, rather than one string with hex values Change-Id: I344eb12ed3b6cbd6d5cca04647667296f49e9df4
1 parent 37bf24e commit 66c3e5d

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

mlir/test/Dialect/Tosa/tosa-validation-version-1p1-valid.mlir

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ func.func @test_argmax_int64(%arg0: tensor<1x13x13x5xf32>) -> tensor<1x13x13xi64
3838
// -----
3939

4040
// CHECK-LABEL: test_const_i64
41-
func.func @test_const_i64(%arg0 : index) -> tensor<4xi64> {
41+
func.func @test_const_i64() -> tensor<4xi64> {
4242
%0 = "tosa.const"() {values = dense<[3, 0, 1, 2]> : tensor<4xi64>} : () -> tensor<4xi64>
4343
return %0 : tensor<4xi64>
4444
}
4545

4646
// -----
4747

4848
// CHECK-LABEL: test_const_fp6e3m2
49-
func.func @test_const_fp6e3m2(%arg0 : index) -> tensor<4xf6E3M2FN> {
49+
func.func @test_const_fp6e3m2() -> tensor<4xf6E3M2FN> {
5050
%0 = "tosa.const"() {values = dense<[0.0, 0.0, 0.0, 0.0]> : tensor<4xf6E3M2FN>} : () -> tensor<4xf6E3M2FN>
5151
return %0 : tensor<4xf6E3M2FN>
5252
}
@@ -94,16 +94,16 @@ func.func @test_cast_to_block_scaled_mxint8(%arg0: tensor<4x32xf32>) -> (tensor<
9494
// -----
9595

9696
// CHECK-LABEL: test_const_fp6e3m2
97-
func.func @test_const_fp6e3m2(%arg0 : index) -> tensor<4xf6E3M2FN> {
97+
func.func @test_const_fp6e3m2() -> tensor<4xf6E3M2FN> {
9898
%0 = "tosa.const"() {values = dense<[0.0, 0.0, 0.0, 0.0]> : tensor<4xf6E3M2FN>} : () -> tensor<4xf6E3M2FN>
9999
return %0 : tensor<4xf6E3M2FN>
100100
}
101101

102102
// -----
103103

104104
// CHECK-LABEL: test_const_mxint8
105-
func.func @test_const_mxint8(%arg0 : index) -> tensor<2x!tosa.mxint8> {
106-
%0 = "tosa.const"() {values = dense<"0x007F"> : tensor<2x!tosa.mxint8>} : () -> tensor<2x!tosa.mxint8>
105+
func.func @test_const_mxint8() -> tensor<2x!tosa.mxint8> {
106+
%0 = "tosa.const"() {values = dense<["0x00", "0x7F"]> : tensor<2x!tosa.mxint8>} : () -> tensor<2x!tosa.mxint8>
107107
return %0 : tensor<2x!tosa.mxint8>
108108
}
109109

@@ -130,11 +130,3 @@ func.func @test_cast_to_block_scaled_mxint8(%arg0: tensor<4x32xf32>) -> (tensor<
130130
%0:2 = tosa.cast_to_block_scaled %arg0 {block_size = #tosa.block_size<BLOCK_SIZE_32> : i32, stochastic_round = false} : (tensor<4x32xf32>) -> (tensor<4x32x!tosa.mxint8>, tensor<4x1xf8E8M0FNU>)
131131
return %0#0, %0#1 : tensor<4x32x!tosa.mxint8>, tensor<4x1xf8E8M0FNU>
132132
}
133-
134-
// -----
135-
136-
// CHECK-LABEL: test_const_mxint8
137-
func.func @test_const_mxint8(%arg0 : index) -> tensor<2x!tosa.mxint8> {
138-
%0 = "tosa.const"() {values = dense<"0x007F"> : tensor<2x!tosa.mxint8>} : () -> tensor<2x!tosa.mxint8>
139-
return %0 : tensor<2x!tosa.mxint8>
140-
}

0 commit comments

Comments
 (0)