[all-commits] [llvm/llvm-project] d57163: [mlir][Linalg] SplitReduction implementation witho...
Nicolas Vasilache via All-commits
all-commits at lists.llvm.org
Wed Jun 22 12:08:48 PDT 2022
Author: Nicolas Vasilache <nicolas.vasilache at gmail.com>
Date: 2022-06-22 (Wed, 22 Jun 2022)
[mlir][Linalg] SplitReduction implementation without tensor::ExpandShapeOp
This revision proposes a different implementation of the SplitReductoin transformation that does
not rely on tensor::ExpandShapeOp.
Previously, a dimension `[k]` would be split into `[k][kk]` via an ExpandShapeOp.
Instead, this revision proposes to rewrite `[k]` into `[factor * k + kk]`.
There are different tradeoffs involved but the proposed implementation is more general because
the affine rewrite is well-defined. In particular, it works naturally with `?` parallel dimensions and
non-trivial indexing maps.
A further rewrite of `[factor * k + kk]` + ExpandShapeOp is possible as a followup.
Differential Revision: https://reviews.llvm.org/D128266
More information about the All-commits