Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Thanks for extending!
Could you point me to your usage of this abstraction (offline is fine)?
mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp | ||
---|---|---|
122 | Can you reshuffle this a bit to early-exit ? auto sliceOp = dyn_cast...; auto emptyOp = dyn_cast...; if (!sliceOp && !emptyOp) return failure(); etc |
Comment Actions
Thanks for reviewing it!
The example is come from IREE. A tensor.empty op takes a result of affine_min after tiling: https://gist.githubusercontent.com/hanhanW/0ff19d0817b9b41b0a6a0a846db6a53d/raw
%20 = affine.min affine_map<(d0) -> (-d0 + 72, 32)>(%arg4) %21 = tensor.empty(%20) : tensor<8x?xi32> %22 = linalg.fill ins(%c0_i32 : i32) outs(%21 : tensor<8x?xi32>) -> tensor<8x?xi32> %23 = linalg.matmul ins(%extracted_slice, %extracted_slice_1 : tensor<8x24xi8>, tensor<24x?xi8>) outs(%22 : tensor<8x?xi32>) -> tensor<8x?xi32>
If the source is not tensor.empty op, it will become extract_slice(%src) -- which works well with existing patterns. If the source is tensor.empty, some patterns are kicked in and create tensor.empty op that takes bounded sizes. For more details, see https://github.com/iree-org/iree/issues/11880
Can you reshuffle this a bit to early-exit ?