[Mlir-commits] [mlir] [mlir][Linalg] Add transform to convert linalg.copy into memref.copy (PR #132422)
Rolf Morel
llvmlistbot at llvm.org
Sun Mar 23 11:21:03 PDT 2025
================
@@ -559,6 +559,40 @@ def InterchangeOp : Op<Transform_Dialect, "structured.interchange",
}];
}
+//===----------------------------------------------------------------------===//
+// LinalgCopyToMemrefOp
+//===----------------------------------------------------------------------===//
+
+def LinalgCopyToMemrefOp :
+ Op<Transform_Dialect, "structured.linalg_copy_to_memref",
+ [FunctionalStyleTransformOpTrait, MemoryEffectsOpInterface,
+ TransformEachOpTrait, TransformOpInterface]> {
+ let description = [{
+ Targeted rewrite of a linalg.copy on memrefs to a memref.copy.
+ This is useful when bufferizing copies to a linalg.copy, later applying some
+ transformations, and then rewriting the copy into a memref.copy.
+ If the input has different element type in the source and destination,
----------------
rolfmorel wrote:
Maybe even say that the destination and source types must be the same memref type as the shape and element type must match either way, right?
https://github.com/llvm/llvm-project/pull/132422
More information about the Mlir-commits
mailing list