[Mlir-commits] [mlir] [mlir][vector] Add vector.to_elements unrolling (PR #157142)
Erick Ochoa Lopez
llvmlistbot at llvm.org
Wed Sep 10 10:51:55 PDT 2025
================
@@ -808,6 +808,28 @@ struct TestUnrollVectorFromElements
}
};
+struct TestUnrollVectorToElements
+ : public PassWrapper<TestUnrollVectorToElements,
+ OperationPass<func::FuncOp>> {
+ MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(TestUnrollVectorToElements)
+
+ StringRef getArgument() const final {
+ return "test-unroll-vector-to-elements";
+ }
+ StringRef getDescription() const final {
+ return "Test unrolling patterns for to_elements ops";
+ }
+ void getDependentDialects(DialectRegistry ®istry) const override {
+ registry.insert<func::FuncDialect, vector::VectorDialect>();
+ }
+
+ void runOnOperation() override {
+ RewritePatternSet patterns(&getContext());
+ populateVectorToElementsLoweringPatterns(patterns);
+ (void)applyPatternsGreedily(getOperation(), std::move(patterns));
+ }
+};
+
----------------
amd-eochoalo wrote:
The reason why this test pass was added is to keep the style consistent with https://github.com/llvm/llvm-project/pull/151175 . Sorry, I am not familiar with TD as an acronym. Do you mean the test dialect or the transform dialect? I am assuming you are asking about adding a transform dialect operation for this pass? I have no experience with them and how scaling is different between the transform dialect and these test passes here. Happy to add it if needed, but I prefer to maintain the consistency with the vector.from_elements unrolling PR.
https://github.com/llvm/llvm-project/pull/157142
More information about the Mlir-commits
mailing list