[Mlir-commits] [mlir] [mlir][linalg] Enable CollapseLinalgDimensions to collapse linalg::CopyOp (PR #68526)

Aviad Cohen llvmlistbot at llvm.org
Wed Oct 11 01:30:35 PDT 2023


AviadCo wrote:

> Overall change looks reasonable. Some refactoring might make this better, but this throws up some design issues. Why is `CopyOp` treated specially? This should work for other Linalg named ops as well. An alternative would be to use matchers to match a `linalg.generic` and convert to a `linalg.copy` after it is collapsed. That way we could keep the two concerns separate (and having a matcher for `linalg.generic` -> `linalg.copy` might be helpful in other places as well.

Actually am fully convient with the current design also. I am afraid that by the time I will need to collapse the `linalg.copy` it would be hard to identify it was `linalg.copy` at the beginning (i.e. after fusion). Any idea how to solve it?

https://github.com/llvm/llvm-project/pull/68526


More information about the Mlir-commits mailing list