@@ -1939,3 +1939,31 @@ func.func @matmul_invalid_mixed_types(%t: tensor<?xf16>, %f: vector<4xf16>)
19391939 outs (%f : vector <4 xf16 >) -> tensor <?xf16 >
19401940 func.return %0 , %f : tensor <?xf16 >, vector <4 xf16 >
19411941}
1942+
1943+ // -----
1944+
1945+ func.func @pooling_nhwc_max_unsigned_non_integer_elem_type (
1946+ %input: tensor <1 x4 x4 x1 xf32 >,
1947+ %filter: tensor <2 x2 xf32 >,
1948+ %init_val: tensor <1 x2 x2 x1 xf32 >) -> tensor <1 x2 x2 x1 xf32 > {
1949+ // expected-error @+1 {{unsupported operation: unsigned max not on uint}}
1950+ %0 = linalg.pooling_nhwc_max_unsigned {dilations = dense <1 > : tensor <2 xi64 >,
1951+ strides = dense <1 > : tensor <2 xi64 >}
1952+ ins (%input , %filter: tensor <1 x4 x4 x1 xf32 >, tensor <2 x2 xf32 >)
1953+ outs (%init_val: tensor <1 x2 x2 x1 xf32 >) -> tensor <1 x2 x2 x1 xf32 >
1954+ return %0 : tensor <1 x2 x2 x1 xf32 >
1955+ }
1956+
1957+ // -----
1958+
1959+ func.func @pooling_nhwc_min_unsigned_non_integer_elem_type (
1960+ %input: tensor <1 x4 x4 x1 xf32 >,
1961+ %filter: tensor <2 x2 xf32 >,
1962+ %init_val: tensor <1 x2 x2 x1 xf32 >) -> tensor <1 x2 x2 x1 xf32 > {
1963+ // expected-error @+1 {{unsupported operation: unsigned min not on uint}}
1964+ %0 = linalg.pooling_nhwc_min_unsigned {dilations = dense <1 > : tensor <2 xi64 >,
1965+ strides = dense <1 > : tensor <2 xi64 >}
1966+ ins (%input , %filter: tensor <1 x4 x4 x1 xf32 >, tensor <2 x2 xf32 >)
1967+ outs (%init_val: tensor <1 x2 x2 x1 xf32 >) -> tensor <1 x2 x2 x1 xf32 >
1968+ return %0 : tensor <1 x2 x2 x1 xf32 >
1969+ }
0 commit comments