[Mlir-commits] [mlir] [mlir][tensor] Generalize/restrict `GeneralizeOuterUnitDimsPackOpPattern` (PR #114315)
Quinn Dawkins
llvmlistbot at llvm.org
Tue Nov 5 10:33:38 PST 2024
https://github.com/qedawkins requested changes to this pull request.
I believe this is a case where the term `outer` is slightly unclear (but I probably interpreted it wrong when I wrote it). What the docs should have said after I added that test is all *tiled outer* dims. In that case the typical decomposition of a pack (`pad` + `expand_shape` + `transpose`) would only be introducing unit dimensions with the `expand_shape` and could use a rank reducing `insert_slice` to introduce the new sizes. Whether the *untiled* outer dims were also unit doesn't affect that aspect of the decomposition.
> This also helped generalize the pattern to support cases like the one below:
> ...
> By restricting the pattern and simplifying the size/shape calculation, supporting the case above becomes much easier.
I don't quite follow how exclusion of non-unit untiled outer dimensions simplifies shape calculation logic here (I suspect it could have been more a matter of the previous implementation being more convoluted than necessary).
https://github.com/llvm/llvm-project/pull/114315
More information about the Mlir-commits
mailing list