[Mlir-commits] [mlir] [mlir][linalg] Support `ParamType` in `vector_sizes` option of `VectorizeOp` transform (PR #87557)
Oleksandr Alex Zinenko
llvmlistbot at llvm.org
Tue Apr 9 13:47:29 PDT 2024
================
@@ -71,3 +71,24 @@ transform.sequence failures(propagate) {
: (!transform.any_op) -> !transform.op<"linalg.generic">
}
+
+// -----
+
+transform.sequence failures(propagate) {
+^bb0(%arg0: !transform.any_op):
+ %0 = transform.param.constant 2 : i64 -> !transform.param<i64>
+ // expected-error at below {{custom op 'transform.structured.vectorize' expected 2 operand type(s)}}
+ transform.structured.vectorize %arg0 vector_sizes [%0, 2] : !transform.any_op, !transform.param<i64>, !transform.param<i64>
+
+}
+
+// -----
+
+transform.sequence failures(propagate) {
+^bb0(%arg0: !transform.any_op):
+ %0 = transform.param.constant 2 : i64 -> !transform.param<i64>
+ // expected-error at below {{expected ']' in dynamic index list}}
+ // expected-error at below {{custom op 'transform.structured.vectorize' expected SSA value or integer}}
+ transform.structured.vectorize %arg0 vector_sizes [%0 : !transform.param<i64>, 2] : !transform.any_op, !transform.param<i64>
----------------
ftynse wrote:
Yep. It's strange that we get two diagnostics for the same error, but it's not in your code. You are welcome to investigate that in a separate patch if you want.
https://github.com/llvm/llvm-project/pull/87557
More information about the Mlir-commits
mailing list