[Mlir-commits] [mlir] [mlir][Affine] affine-super-vectorize transform op (PR #177755)
Oleksandr Alex Zinenko
llvmlistbot at llvm.org
Sat Jan 24 13:36:18 PST 2026
================
@@ -94,4 +94,35 @@ def SimplifyMinMaxAffineOpsOp :
}];
}
+def SuperVectorizeOp
+ : Op<Transform_Dialect, "affine.super_vectorize",
+ [DeclareOpInterfaceMethods<MemoryEffectsOpInterface>,
+ DeclareOpInterfaceMethods<TransformOpInterface>]> {
+ let description = [{
+ Vectorize to a target independent n-D vector abstraction.
+ This operation is an exposition to the transform dialect of the affine-super-vectorize pass.
+ To make its usage easier, it ignores inputs which are children of an affine.for op (itself excluded),
+ this way the matcher can be simpler.
+
+ Example:
+ ```
+ %0 = transform.structured.match ops{["affine.for"]} in %arg1 : (!transform.any_op) -> !transform.any_op
+ transform.affine.super_vectorize %0 [8, 16] fastest_varying_pattern=[1,0] vectorize_reductions=true : !transform.any_op
+ ```
+ }];
+
+ let arguments = (ins TransformHandleTypeInterface:$target,
+ DenseI64ArrayAttr:$vector_sizes,
+ OptionalAttr<DenseI64ArrayAttr>:$fastest_varying_pattern,
+ DefaultValuedAttr<BoolAttr, "false">:$vectorize_reductions);
+ let results = (outs);
+
+ let assemblyFormat = [{
+ $target $vector_sizes
+ (`fastest_varying_pattern` `=` $fastest_varying_pattern^)?
+ (`vectorize_reductions` `=` $vectorize_reductions^)?
+ attr-dict `:` type($target)
+ }];
+}
----------------
ftynse wrote:
This isn't enough. https://github.com/llvm/llvm-project/blob/f7d7897f4b71550fb3170626f78b61c5f83562fb/mlir/include/mlir/Dialect/Transform/IR/TransformDialect.h#L224-L231.
https://github.com/llvm/llvm-project/pull/177755
More information about the Mlir-commits
mailing list