summaryrefslogtreecommitdiff
path: root/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
diff options
context:
space:
mode:
authorAndrzej Warzyński <andrzej.warzynski@arm.com>2025-09-12 11:09:06 +0100
committerGitHub <noreply@github.com>2025-09-12 11:09:06 +0100
commit77596b78e5664fff8d272599c0420fc9b87e2c2d (patch)
tree26d77cbe411e611d2e254a95ed725adc12c75296 /mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
parent0d65856584dffafbc417919d8fcb8ad66f9fbf8a (diff)
[mlir][vector] Add a new TD op to wrap unit-dim collapsing patterns (#157507)
Adds a new TD Op, * `apply_patterns.vector.drop_inner_most_unit_dims_from_xfer_ops`, which wraps the following Vector patterns: * `DropInnerMostUnitDimsTransferRead` * `DropInnerMostUnitDimsTransferWrite` This complements other existing unit-dimension–related patterns. To reduce duplication, the `TestVectorTransferCollapseInnerMostContiguousDims` pass has been removed. That pass was only used for testing, and its functionality is now covered by the newly added TD Op.
Diffstat (limited to 'mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp')
-rw-r--r--mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp32
1 files changed, 0 insertions, 32 deletions
diff --git a/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp b/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
index d6596cd341df..c2d184626818 100644
--- a/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
+++ b/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
@@ -344,36 +344,6 @@ struct TestVectorTransferOpt
}
};
-struct TestVectorTransferCollapseInnerMostContiguousDims
- : public PassWrapper<TestVectorTransferCollapseInnerMostContiguousDims,
- OperationPass<func::FuncOp>> {
- MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(
- TestVectorTransferCollapseInnerMostContiguousDims)
-
- TestVectorTransferCollapseInnerMostContiguousDims() = default;
- TestVectorTransferCollapseInnerMostContiguousDims(
- const TestVectorTransferCollapseInnerMostContiguousDims &pass) = default;
-
- void getDependentDialects(DialectRegistry &registry) const override {
- registry.insert<memref::MemRefDialect, affine::AffineDialect>();
- }
-
- StringRef getArgument() const final {
- return "test-vector-transfer-collapse-inner-most-dims";
- }
-
- StringRef getDescription() const final {
- return "Test lowering patterns that reduces the rank of the vector "
- "transfer memory and vector operands.";
- }
-
- void runOnOperation() override {
- RewritePatternSet patterns(&getContext());
- populateDropInnerMostUnitDimsXferOpPatterns(patterns);
- (void)applyPatternsGreedily(getOperation(), std::move(patterns));
- }
-};
-
struct TestVectorSinkPatterns
: public PassWrapper<TestVectorSinkPatterns, OperationPass<func::FuncOp>> {
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(TestVectorSinkPatterns)
@@ -1079,8 +1049,6 @@ void registerTestVectorLowerings() {
PassRegistration<TestVectorTransferOpt>();
- PassRegistration<TestVectorTransferCollapseInnerMostContiguousDims>();
-
PassRegistration<TestVectorSinkPatterns>();
PassRegistration<TestVectorReduceToContractPatternsPatterns>();