[Mlir-commits] [mlir] [mlir][linalg] Produce canonical linalg.generic for im2col (PR #134675)
Quinn Dawkins
llvmlistbot at llvm.org
Wed Apr 9 10:27:12 PDT 2025
qedawkins wrote:
I am actually curious about the opposite here. Why do you think
```
#map = affine_map<(d0, d1, d2) -> (d0, d1 floordiv 14 + d2 floordiv 12, d1 mod 14 + (d2 mod 12) floordiv 4, d2 mod 4)>
#map1 = affine_map<(d0, d1, d2) -> (d0, d1, d2)>
%1 = linalg.generic {indexing_maps = [#map, #map1], iterator_types = ["parallel", "parallel", "parallel"]} ins(%arg0 : tensor<1x16x16x4xf32>) outs(%0 : tensor<1x196x36xf32>) {
^bb0(%in: f32, %out: f32):
linalg.yield %in : f32
} -> tensor<1x196x36xf32>
```
is the more canonical representation? Which patterns does it enable that aren't possible with the existing representation? Asking for clarity, not to argue one way or another.
https://github.com/llvm/llvm-project/pull/134675
More information about the Mlir-commits
mailing list