Skip to content

Commit e7b217d

Browse files
committed
Add 4-way test case
1 parent c82592c commit e7b217d

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

mlir/test/Dialect/Transform/test-tune-extension.mlir

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,3 +158,30 @@ module attributes {transform.with_named_sequence} {
158158
transform.yield
159159
}
160160
}
161+
162+
// -----
163+
164+
// CHECK-LABEL: eeny_meeny_miny_moe
165+
func.func private @eeny_meeny_miny_moe()
166+
167+
module attributes {transform.with_named_sequence} {
168+
transform.named_sequence @__transform_main(%arg0: !transform.any_op {transform.readonly}) {
169+
%matmul = transform.structured.match ops{["linalg.matmul"]} in %arg0 : (!transform.any_op) -> !transform.any_op
170+
171+
%tiled_matmul = transform.tune.alternatives<"4way"> selected_region = 3 -> !transform.any_param
172+
{ // First alternative/region, with index = 0
173+
%out = transform.param.constant "eeny" -> !transform.any_param
174+
transform.yield %out : !transform.any_param
175+
}, { // Second alternative/region, with index = 1
176+
%out = transform.param.constant "meeny" -> !transform.any_param
177+
transform.yield %out : !transform.any_param
178+
}, { // Third alternative/region, with index = 2
179+
%out = transform.param.constant "miny" -> !transform.any_param
180+
transform.yield %out : !transform.any_param
181+
}, { // Fourth alternative/region, with index = 3
182+
%out = transform.param.constant "moe" -> !transform.any_param
183+
transform.yield %out : !transform.any_param
184+
}
185+
transform.yield
186+
}
187+
}

0 commit comments

Comments
 (0)