This is an archive of the discontinued LLVM Phabricator instance.

[mlir][linalg] Fuse producers with non-permutation indexing maps
ClosedPublic

Authored by antiagainst on Mar 20 2021, 7:36 AM.

Details

Summary

Until now Linalg fusion only allow fusing producers whose operands
are all permutation indexing maps. It's easier to deduce the
subtensor/subview but it is an unnecessary constraint, as in tiling
we have more advanced logic to deduce the subranges even when the
operand is not of permutation indexing maps, e.g., the input operand
for convolution ops.

This patch uses the logic on tiling side to deduce subranges for
fusion. This enables fusing convolution with its consumer ops
when possible.

Along the way, we are now generating proper affine.min ops to guard
against size boundaries, if we cannot be certain they won't be
out of bounds.

Depends On D99013

Diff Detail