|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init |
|
| #
a5c802a4 |
| 08-Jul-2022 |
Alex Zinenko <[email protected]> |
[mlir] fold more eagerly in structured op splitting
Existing implementation of structured op splitting creates several affine.apply and affine.min operations in its subshape computation. As these sh
[mlir] fold more eagerly in structured op splitting
Existing implementation of structured op splitting creates several affine.apply and affine.min operations in its subshape computation. As these shapes are further used in data slice extraction, this may lead to slice shapes being dynamic even when the original shapes and the splitting point are static. This is particularly visible when splitting is combined with further subsetting transformations such as tiling. Use composition and folding more aggressively in splitting to avoid this.
In particular, introduce a `createComposedAffineMin` function that the affine map used in "min" with the maps used by any `affine.apply` that may be feeding the operands to the "min". This enables production of more static shapes. Also introduce a `createComposedFoldedAffineApply` function that combines the existing `createComposedAffineApply` with in-place folding to propagate constants produced by zero-input affine maps. Using these when splitting allows the subsequent canonicalizer pass to recover static shapes for structured ops.
Reviewed By: nicolasvasilache
Differential Revision: https://reviews.llvm.org/D129379
show more ...
|
| #
81b62f7f |
| 08-Jul-2022 |
Alex Zinenko <[email protected]> |
[mlir] Handle linalg.index correctly in TilingInterface
The existing implementation of the TilingInterface for Linalg ops was not modifying the `linalg.index` ops contained within other Linalg ops (
[mlir] Handle linalg.index correctly in TilingInterface
The existing implementation of the TilingInterface for Linalg ops was not modifying the `linalg.index` ops contained within other Linalg ops (they need to be summed up with the values of respective tile loop induction variables), which led to the interface-based tiling being incorrect for any Linalg op with index semantics.
In the process, fix the function performing the index offsetting to use the pattern rewriter API instead of RAUW as it is being called from patterns and may mess up the internal state of the rewriter. Also rename the function to clearly catch all uses.
Depends On D129365
Reviewed By: mravishankar
Differential Revision: https://reviews.llvm.org/D129366
show more ...
|
| #
4e4a4c05 |
| 07-Jul-2022 |
Alex Zinenko <[email protected]> |
[mlir] Allow Tile transform op to take dynamic sizes
Extend the definition of the Tile structured transform op to enable it accepting handles to operations that produce tile sizes at runtime. This i
[mlir] Allow Tile transform op to take dynamic sizes
Extend the definition of the Tile structured transform op to enable it accepting handles to operations that produce tile sizes at runtime. This is useful by itself and prepares for more advanced tiling strategies. Note that the changes are relevant only to the transform dialect, the tiling transformation itself already supports dynamic sizes.
Depends On D129216
Reviewed By: nicolasvasilache
Differential Revision: https://reviews.llvm.org/D129217
show more ...
|
| #
ff6e5508 |
| 07-Jul-2022 |
Alex Zinenko <[email protected]> |
[mlir] Structured transforms: introduce op splitting
Introduce a new transformation on structured ops that splits the iteration space into two parts along the specified dimension. The index at which
[mlir] Structured transforms: introduce op splitting
Introduce a new transformation on structured ops that splits the iteration space into two parts along the specified dimension. The index at which the splitting happens may be static or dynamic. This transformation can be seen as a rudimentary form of index-set splitting that only supports the splitting along hyperplanes parallel to the iteration space hyperplanes, and is therefore decomposable into per-dimension application.
It is a key low-level transformation that enables independent scheduling for different parts of the iteration space of the same op, which hasn't been possible previously. It may be used to implement, e.g., multi-sized tiling. In future, peeling can be implemented as a combination of split-off amount computation and splitting.
The transformation is conceptually close to tiling in its separation of the iteration and data spaces, but cannot be currently implemented on top of TilingInterface as the latter does not properly support `linalg.index` offsetting.
Note that the transformation intentionally bypasses folding of `tensor.extract_slice` operations when creating them as this folding was found to prevent repeated splitting of the same operation because due to internal assumptions about extract/insert_slice combination in dialect utilities.
Reviewed By: nicolasvasilache
Differential Revision: https://reviews.llvm.org/D129090
show more ...
|