[Mlir-commits] [mlir] [mlir][linalg] Implement TilingInterface for winograd operators (PR #96184)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Aug 15 06:02:30 PDT 2024


Max191 wrote:

@Hsiangkai I mentioned it on your first PR, but now that the pieces will have landed for this layout, do you have cycles to work on extending this to work for NCHW convolutions as well? There is a big performance benefit from having the convolutions in NCHW layout with winograd.

You will need to add some fields to the ops that indicate the layout of the convolution. In IREE we did it by adding a list of indices for where the image dims are: https://github.com/iree-org/iree/blob/b144e905701572d6bd89ea1d4bf55f817b9d3a2b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.td#L1187

And then you can tell which layout it is based on these dims: https://github.com/iree-org/iree/blob/b144e905701572d6bd89ea1d4bf55f817b9d3a2b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.td#L1251-L1258

This isn't the only solution (and not necessarily the cleanest either), but just an idea of how it could work.

Let me know if you would like to work on this :-)

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


More information about the Mlir-commits mailing list