blob: 8dc426cd7c4b07150360e95ab156afc5371a57a7 [file]
func @sort2D() {
%input = util.unfoldable_constant dense<[[5, 6], [3, 7]]> : tensor<2x2xi32>
%0 = linalg_ext.sort dimension(0) outs(%input : tensor<2x2xi32>) {
^bb0(%arg2: i32, %arg3: i32): // no predecessors
%1 = arith.cmpi slt, %arg2, %arg3 : i32
linalg_ext.yield %1 : i1
} -> tensor<2x2xi32>
check.expect_eq_const(%0, dense<[[3, 6], [5, 7]]> : tensor<2x2xi32>) : tensor<2x2xi32>
return
}